我遇到了一些奇怪的例外
java.lang.NullPointerException
com.ocpsoft.pretty.faces.application.PrettyNavigationHandler.processFacesNavigation(PrettyNavigationHandler.java:58)
com.ocpsoft.pretty.faces.application.PrettyNavigationHandler.handleNavigation(PrettyNavigationHandler.java:44)
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:130)
javax.faces.component.UICommand.broadcast(UICommand.java:315)
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
ua.com.winforce.online.site.http.filter.LocaleFilter.doFilter(LocaleFilter.java:65)
在login.jspx页面上提交简单表单后出现
<h:form>
<div class="form-group">
<label for="rLogin"><h:outputText value="#{localeController.locale.registr.email}" escape="false"/></label>
<h:inputText id="rLogin" value="#{playerRegistration.login}" />
</div>
<div class="form-group">
<label for="rPassword"><h:outputText value="#{localeController.locale.registr.password}" escape="false"/></label>
<h:inputSecret value="#{playerRegistration.password}"/>
</div>
<h:commandButton value="#{localeController.locale.mainMsg.registration}" action="#{playerRegistration.doRegistration}" />
LocaleFilter照常工作。
我认为配置有问题但找不到原因。
主pom.xml:
<properties>
<targetJdk>1.6</targetJdk>
<spring.version>4.0.5.RELEASE</spring.version>
<spring.security.version>3.2.4.RELEASE</spring.security.version>
<hibernate.version>4.2.16.Final</hibernate.version>
<richfaces.version>4.3.7.Final</richfaces.version>
</properties>
<dependencyManagement>
<dependencies>
<!-- Utils -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.7</version>
</dependency>
<!-- Servlets / JSP / JSTL -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<!-- RichFaces libraries -->
<dependency>
<groupId>org.richfaces</groupId>
<artifactId>richfaces-bom</artifactId>
<version>${richfaces.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-impl</artifactId>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-components-ui</artifactId>
</dependency>
</dependencies>
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
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_3_0.xsd"
version="3.0">
<mime-mapping>
<extension>jspx</extension>
<mime-type>application/xml</mime-type>
</mime-mapping>
<context-param>
<param-name>javax.faces.application.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.jspx</param-value>
</context-param>
<context-param>
<param-name>javax.faces.FACELETS_SUFFIX</param-name>
<param-value>.jspx</param-value>
</context-param>
<context-param>
<param-name>javax.faces.FACELETS_VIEW_MAPPINGS</param-name>
<param-value>*.jspx</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.enableRestoreView11Compatibility</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/applicationContext-site-dao.xml
/WEB-INF/applicationContext-site-security.xml
</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.sendPoweredByHeader</param-name>
<param-value>false</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.security.web.session.HttpSessionEventPublisher</listener-class>
</listener>
<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>*.html</url-pattern>
</servlet-mapping>
<faces-config version="2.1" xmlns="http://java.sun.com/xml/ns/javaee"
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-facesconfig_2_1.xsd">
<application>
<el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver>
<locale-config>
<default-locale>ru</default-locale>
<supported-locale>ru</supported-locale>
<supported-locale>en</supported-locale>
</locale-config>
我准备添加任何额外的信息,以找到这种情况的原因。我希望有人能帮我找到解决这个问题的方法,因为谷歌并不知道这个问题。任何帮助都是有用的。
将prettyfaces更改为JSF2兼容版本(例如prettyfaces-jsf2-3.3.3.jar)
PrettyFaces-JSF12...是针对JSF 1.2,PrettyFaces-JSF2...用于JSF2.x(来自OCPSoft文档)
,检查它在项目中的定义是否正确。此外,您还可以在web.xml中添加以下筛选器:
<filter>
<filter-name>Pretty Filter</filter-name>
<filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Pretty Filter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>
不确定是不是因为okhttp版本,但我尝试了2.3.0和3.4.0之间的几个不同版本,但都不起作用。 有什么想法吗?提前谢了。
我刚刚创建了一个TablView,我成功地将数据放入其中。问题是当我双击一个单元格(要更新)时,它会显示更新的数据,但当我单击离开时,更新的单元格会显示旧数据! 这里的代码: 有人能帮帮我吗?厚度
我的R.java文件没有生成,我在这里搜索了答案,但没有一个答案有效。在我更新ADT之前,一切都很好,所以代码应该没问题。这是我尝试过的: null 我该怎么办?请帮帮我!
最近我把我的Android Studio更新到3.6.1,没有出现任何问题,但是当Gradle完成同步时,一条错误消息就显示在我的构建和事件日志中。 (“build”消息内部) null --谢谢您提前回答。
当你在gitbook.com上创建了书本后,你需要推送一些内容给它。你可以使用网页编辑器或者命令行来做这件事。 如果你想要通过命令行来更新你的书本的话,你可以使用 GIT 来推送你的内容。 GIT Url 每本书本都有一个相关联的Git HTTPS url。GitBook的git服务器暂时还不支持ssh协议。 git url的格式是: https://git.gitbook.com/{{UserN
嘿,伙计们,我最近将我的mac更新为最新的OS X 10.12.3以前我的rails项目运行良好,现在每当我启动rails服务器时,我的项目都会收到这个错误。我尝试了在stackoverflow中提供的很多不同的解决方案,但它仍然不起作用。 这里有一些我尝试过的 Postgres无法连接到服务器 PostgreSQL错误“无法连接到服务器:没有这样的文件或目录” 谢谢,请帮帮我