0
我試圖構建自定義網址爲prettyfaces告訴它做什麼,但安裝後,它給了我這個錯誤:靚麗,它沒有被解決?
Referenced file contains errors (http://ocpsoft.org/xml/ns/prettyfaces/ocpsoft-pretty-faces-3.3.3.xsd). For more information, right click on the message in the Problems View and select "Show Details..."
這是怎麼我的web.xml
設置:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>BRAINSET</display-name>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name>
<param-value>true</param-value>
</context-param>
<welcome-file-list>
<welcome-file>index.xhtml</welcome-file>
</welcome-file-list>
<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>*.xhtml</url-pattern>
</servlet-mapping>
<filter>
<filter-name>Pretty Filter</filter-name>
<filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>
<async-supported>true</async-supported>
</filter>
<filter-mapping>
<filter-name>Pretty Filter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
<dispatcher>ERROR</dispatcher>
<dispatcher>ASYNC</dispatcher>
</filter-mapping>
</web-app>
而且我pretty-config.xml
:
<pretty-config xmlns="http://ocpsoft.org/prettyfaces/3.3.3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ocpsoft.org/prettyfaces/3.3.3
http://ocpsoft.org/xml/ns/prettyfaces/ocpsoft-pretty-faces-3.3.3.xsd">
<url-mapping id="home">
<pattern value="/home" />
<view-id value="/index.xhtml" />
</url-mapping>
有了這個錯誤,我不能甚至在Glassfish
部署我的應用程序:
Could not publish to the server.
java.lang.NullPointerException
任何想法如何解決這個問題?或者我應該尋找另一種類似於prettyfaces
的工具?
更新
非常感謝!你是對的! 一個奇怪的事情,在與XSD一起使用的prettyfaces [1]網站上,這就是我使用它的原因。那麼它似乎並沒有結束。再次感謝你的朋友。 [1] http://ocpsoft.org/prettyfaces/ –
架構的使用只是爲了在IDE中編輯XML時自動完成。據我所知,它是有效的,但這聽起來像是一個Glassfish錯誤。 – Lincoln
@Lincoln,明白了,謝謝你的信息夥計。 –