- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
使用 JSF、Spring、Spring WebFlow、PrimeFaces。我正在尝试打开简单的“hello world”页面。页面本身已打开,但抛出异常,无法包含 Primeface 的主题:
11:03:41,049 DEBUG FlowHandlerMapping:108 - Mapping request with URI '/spring/hello' to flow with id 'hello'
11:03:41,050 DEBUG FlowExecutorImpl:161 - Resuming flow execution with key 'e1s1
11:03:41,050 DEBUG SessionBindingConversationManager:75 - Locking conversation 1
11:03:41,050 DEBUG DefaultFlowExecutionRepository:106 - Getting flow execution with key 'e1s1'
11:03:41,050 DEBUG FlowDefinitionRegistryImpl:58 - Getting FlowDefinition with id 'hello'
11:03:41,052 DEBUG ConditionalFlowExecutionListenerLoader:85 - Loaded [1] of possible 1 listeners for this execution request for flow 'hello', the listeners to attach are list[org.springframework.faces.webflow.FlowFacesContextLifecycleListener@4a00e737]
11:03:41,053 DEBUG FlowExecutionImpl:250 - Resuming in org.springframework.webflow.mvc.servlet.MvcExternalContext@5c282a38
11:03:41,057 DEBUG ViewState:286 - Rendering + [JSFView = '/WEB-INF/flows/hello.xhtml']
11:03:41,057 DEBUG ViewState:287 - Flash scope = map[[empty]]
11:03:41,058 DEBUG ViewState:288 - Messages = [DefaultMessageContext@1d152003 sourceMessages = map[[null] -> list[[empty]]]]
11:03:41,065 DEBUG DefaultFlowExecutionRepository:121 - Putting flow execution '[FlowExecutionImpl@499bfb44 flow = 'hello', flowSessions = list[[FlowSessionImpl@7d3adf4c flow = 'hello', state = 'displayHelloView', scope = map['viewScope' -> map[[empty]]]]]]' into repository
11:03:41,066 DEBUG DefaultFlowExecutionRepository:128 - Adding snapshot to group with id 1
11:03:41,066 DEBUG SessionBindingConversationManager:86 - Putting conversation attribute 'scope' with value map['flashScope' -> map['messagesMemento' -> map[[empty]]]]
11:03:41,066 DEBUG SessionBindingConversationManager:107 - Unlocking conversation 1
11:03:41,084 DEBUG FlowHandlerMapping:114 - No flow mapping found for request with URI '/spring/*/javax.faces.resource/theme.css'
May 04, 2018 11:03:41 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [springFlowApplication] in context with path [/spring] threw exception [Request processing failed; nested exception is javax.faces.FacesException: /WEB-INF/*/javax.faces.resource/theme.xhtml Not Found in ExternalContext as a Resource] with root cause
com.sun.faces.context.FacesFileNotFoundException: /WEB-INF/*/javax.faces.resource/theme.xhtml Not Found in ExternalContext as a Resource
at com.sun.faces.facelets.impl.DefaultFaceletFactory.resolveURL(Unknown Source)
at com.sun.faces.facelets.impl.DefaultFaceletFactory.resolveURL(Unknown Source)
at com.sun.faces.facelets.impl.DefaultFaceletFactory.getFacelet(Unknown Source)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(Unknown Source)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(Unknown Source)
at com.sun.faces.lifecycle.Phase.doPhase(Unknown Source)
at com.sun.faces.lifecycle.LifecycleImpl.render(Unknown Source)
at org.springframework.faces.mvc.JsfView.renderMergedOutputModel(JsfView.java:81)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1244)
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1027)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:971)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
页面正在使用这样的 CSS 链接生成,其中还包含星号登录 href:
<link type="text/css" rel="stylesheet" href="/spring/*/javax.faces.resource/theme.css?ln=primefaces-aristo">
不带星号的 CSS 本身可以通过以下链接正确打开:
.../spring/javax.faces.resource/theme.css?ln=primefaces-aristo
我的 POM.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.jcg.examples.springWebFlowExample</groupId>
<artifactId>SpringWebFlowExample</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>SpringWebFlowExample</name>
<url>http://maven.apache.org</url>
<properties>
<servlet.version>3.1.0</servlet.version>
<jsf.version>2.2.9</jsf.version>
<primefaces.version>6.0</primefaces.version>
</properties>
<repositories>
<repository>
<id>prime-repo</id>
<name>PrimeFaces Maven Repository</name>
<url>http://repository.primefaces.org</url>
<layout>default</layout>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>org.springframework.webflow</groupId>
<artifactId>spring-webflow</artifactId>
<version>2.4.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.webflow</groupId>
<artifactId>spring-faces</artifactId>
<version>2.4.2.RELEASE</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>${servlet.version}</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>${jsf.version}</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>${jsf.version}</version>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>${primefaces.version}</version>
</dependency>
<dependency>
<groupId>com.sun.facelets</groupId>
<artifactId>jsf-facelets</artifactId>
<version>1.1.14</version>
</dependency>
<dependency>
<groupId>org.primefaces.themes</groupId>
<artifactId>blitzer</artifactId>
<version>1.0.10</version>
</dependency>
<dependency>
<groupId>org.primefaces.themes</groupId>
<artifactId>aristo</artifactId>
<version>1.0.1</version>
</dependency>
</dependencies>
<build>
<finalName>SpringWebFlowExample</finalName>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
</project>
WEB.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
version="2.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>Spring-Flow Web-Application Example</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring-config.xml</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name>
<param-value>1</param-value>
</context-param>
<servlet>
<servlet-name>Resources Servlet</servlet-name>
<servlet-class>org.springframework.js.resource.ResourceServlet</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet-mapping>
<servlet-name>Resources Servlet</servlet-name>
<url-pattern>/resources/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>springFlowApplication</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value></param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springFlowApplication</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<filter>
<filter-name>charEncodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>charEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
网络流配置:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:flow="http://www.springframework.org/schema/webflow-config"
xmlns:faces="http://www.springframework.org/schema/faces"
xsi:schemaLocation="http://www.springframework.org/schema/webflow-config
http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.4.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/faces
http://www.springframework.org/schema/faces/spring-faces.xsd">
<bean id="facesContextListener" class="org.springframework.faces.webflow.FlowFacesContextLifecycleListener" />
<flow:flow-executor id="flowExecutor">
<flow:flow-execution-listeners>
<flow:listener ref="facesContextListener"/>
</flow:flow-execution-listeners>
</flow:flow-executor>
<flow:flow-registry id="flowRegistry" flow-builder-services="facesFlowBuilderServices">
<flow:flow-location id="hello" path="/WEB-INF/flows/hello-flow.xml" />
</flow:flow-registry>
<!-- Configures the Spring Web Flow JSF integration -->
<faces:flow-builder-services id="facesFlowBuilderServices" development="true" />
<faces:resources/>
<bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping">
<property name="order" value="1"/>
<property name="flowRegistry" ref="flowRegistry" />
<property name="defaultHandler">
<bean class="org.springframework.web.servlet.mvc.UrlFilenameViewController" />
</property>
</bean>
<bean class="org.springframework.faces.webflow.JsfFlowHandlerAdapter">
<property name="flowExecutor" ref="flowExecutor" />
</bean>
<bean id="faceletsViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass" value="org.springframework.faces.mvc.JsfView"/>
<property name="prefix" value="/WEB-INF/" />
<property name="suffix" value=".xhtml" />
</bean>
<bean class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter" />
</beans>
最佳答案
解决了将 url-pattern 更新为以下问题:
<servlet-mapping>
<servlet-name>springFlowApplication</servlet-name>
<url-pattern>/app/*</url-pattern>
</servlet-mapping>
如果有人能解释为什么需要添加“/app”,那就太好了,因为现在整个 URL 还包含“../app/..”,这看起来不太好看......
关于java - JSF:/WEB-INF/*/javax.faces.resource/theme.xhtml 在ExternalContext 中未找到资源(Primeface 的资源 URI 有星号),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50170621/
大家好,我正在使用 OpenCV(Python)开发人脸识别程序。我有两个文件,一个可以捕捉新用户的脸并按用户提供的名称存储它。第二个文件识别使用网络摄像头的用户。现在,我担心的是用户被正确识别,但名
一般来说,我的字体工作正常,但我偶尔会看到一些奇怪的情况,例如从另一个应用程序切换回浏览器,有时当从另一个选项卡切换回时,我的字体似乎已经卸载并正在使用后备字体。 我正在努力始终如一地复制它,当我看到
我经常在我开发的网站中嵌入 webfont (@font-face),直到今天我才遇到过重大问题。 其实我觉得line-height有很大的问题,我英文不是特别好所以我尽量用图来说明。我已经联系了 f
屏幕截图很棒,但没有呈现自定义 @font-face 字体。是否有可能纠正这一点? 最佳答案 在做了一些研究之后,我发现了这个 http://code.google.com/p/phantomjs/i
所以我有一个字体,我最近在几个网站上使用了它,叫做 Kondolar。这是一种可爱的字体,我实际上使用了 4 种字体粗细,所以在我的样式表中实际上有 4 个 @font-face 定义,每个定义都有自
非常感谢:)请找到完整的代码 导入boto3 s3_client = boto3.client('s3', aws_access_key_id='xxxxxxxxxxxxxxx', aws_secre
这不是以下的骗局:Can we test Face ID in simulator? 我想知道如何测试用户何时接受下面的 Face ID 警告,上面写着“你想允许“应用程序”使用 Face ID”,然
我需要检测 iPhone 朝向哪个方向,以便在掉落时从无障碍摄像头(正面或背面)进行录制。 这将在紧急情况下使用,手机掉落或放置在事件摄像头没有记录任何有值(value)内容的情况下。 我可以使用什么
我有一个需要 Trade Gothic 的网站。我想知道将 @font-face 或 cufon 与看起来类似于 Trade Gothic 的字体一起使用还是只是使用图像路线是更好的做法。显然,使用图
我在使用 Microsoft Face API 时遇到问题。以下是我的示例请求: curl -v -X POST "https://westus.api.cognitive.microsoft.com
我有一个在图像上运行并识别人脸并返回如下列表的脚本: [('Mike', (142, 464, 365, 241)),('Garry', (42, 364, 65, 141)),('unknown',
我有一个网络服务,可以重写 css 文件中的 url,以便可以通过 CDN 提供它们。 css 文件可以包含图像或字体的 url。 我目前有以下正则表达式来匹配 css 文件中的所有 url: (ur
我在乱用 @font-face 并且得到了一些奇怪的结果。我下载并安装了字体,它像它应该的那样安装在/Users/myuser/Library/Fonts 中(我想!?)。奇怪的是,无论我在 CSS
JSF 2 的 Mojarra 实现具有以下上下文参数: com.sun.faces.numberOfViewsInSession(默认为 15) com.sun.faces.numberOfLogi
jsf-api.jar 包含各种本地化的 Messages.properties 文件,这些文件一方面包含 javax.faces.component.UIInput.CONVERSION 键,另一方
谁能介绍一下 Liferay Faces 和 JSF 连接。就像我无法理解 Liferay 人脸在以下场景中的作用。 JSF ----> Model View Controller Spr
我正在尝试使用我的字体的“较轻”版本,但在 firefox 和 chrome 中它仍然显示为“正常”粗细。 这是我的 font.css: @font-face { font-family: Aveni
尝试访问应用程序时出现以下JavaScript错误。 Uncaught SyntaxError: Unexpected token 和的正常运行是必需的)。 您可能已经知道HTML文档通常通常以<和J
在我的应用程序中,我想对 UIImage 使用人脸检测,所以我使用库中的 CoreImage 构建(我知道 Vision Library 也是最新的人脸检测库。但它仅支持 ios 11.0 及以上)。
我需要从 Stylus 获得以下 CSS 输出(这是一种落后的方式,但 Stylus 将使该元素的许多其他部分变得更容易)。我已经尝试了很多东西,但无法编译,当它说它已经编译时,这部分输出没有任何显示
我是一名优秀的程序员,十分优秀!