2012-11-30 24 views
0

我的公司擁有使用IBM WAS 6.1解決方案的1.8標準。在閱讀icefaces教程後,我決定實施一個facelets解決方案來做一個更好的模板管理。沒有顯示iceFaces - facelets網址欄地址

在faces-config.xml中我把下一行到CONFIG的小面:

<view-handler>com.icesoft.faces.facelets.D2DFaceletViewHandler</view-handler> 

中的web.xml,被配置爲搜索中的index.jsp作爲上下文的主網頁:

<welcome-file-list> 
    <welcome-file>index.jsp</welcome-file> 
</welcome-file-list> 

索引轉發到我的導航邏輯的第一頁。

<body> 
    <jsp:forward page="paso1.iface" /> 
    </body> 

但在瀏覽器地址欄中的地址,我仍然看到http://server.com/context路徑。

當表單數據已經寫好,我提交,運行我的動作,導航規則將我發送到下一頁。

但是,關於瀏覽器的URL欄地址,仍然在http://server.com/context的路徑中。

<navigation-rule> 
    <from-view-id>/step1.jspx</from-view-id> 
    <navigation-case> 
     <from-action>#{actionBean.action}</from-action> 
     <from-outcome>success</from-outcome> 
     <to-view-id>/step2.jspx</to-view-id> 
    </navigation-case> 
    <navigation-case> 
     <from-action>#{actionBean.action}</from-action> 
     <from-outcome>fail</from-outcome> 
     <to-view-id>/step1.jspx</to-view-id> 
    </navigation-case> 
</navigation-rule> 

我不能使用重定向,因爲有一些會話數據。即使我嘗試使用標準Java EE Facelets標記com.sun.facelets.FaceletViewHandler,但無法呈現頁面。

如何強制或配置正確的IceFaces Facelet向我展示網頁比我已經踏上?

--- web.xml中---

<?xml version="1.0" encoding="UTF-8"?> 
<web-app 
    id="WebApp_ID" 
    version="2.4" 
    xmlns="http://java.sun.com/xml/ns/j2ee" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> 
    <display-name>venta-directa-web</display-name> 
    <welcome-file-list> 
     <welcome-file>index.jsp</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> 
     <servlet-name>Blocking Servlet</servlet-name> 
     <servlet-class>com.icesoft.faces.webapp.xmlhttp.BlockingServlet</servlet-class> 
     <load-on-startup>1</load-on-startup> 
    </servlet> 
    <servlet> 
     <servlet-name>Persistent Faces Servlet</servlet-name> 
     <servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class> 
     <load-on-startup>1</load-on-startup> 
    </servlet> 
    <servlet> 
     <servlet-name>uploadServlet</servlet-name> 
     <servlet-class>com.icesoft.faces.component.inputfile.FileUploadServlet</servlet-class> 
     <load-on-startup>1</load-on-startup> 
    </servlet> 
    <servlet> 
     <servlet-name>SimpleCaptcha</servlet-name> 
     <servlet-class>nl.captcha.servlet.SimpleCaptchaServlet</servlet-class> 
    </servlet> 
    <servlet> 
     <servlet-name>StickyCaptcha</servlet-name> 
     <servlet-class>nl.captcha.servlet.StickyCaptchaServlet</servlet-class> 
     <init-param> 
      <param-name>width</param-name> 
      <param-value>250</param-value> 
     </init-param> 
     <init-param> 
      <param-name>height</param-name> 
      <param-value>75</param-value> 
     </init-param> 
    </servlet> 
    <servlet> 
     <servlet-name>ChineseCaptcha</servlet-name> 
     <servlet-class>nl.captcha.servlet.ChineseCaptchaServlet</servlet-class> 
     <init-param> 
      <param-name>width</param-name> 
      <param-value>265</param-value> 
     </init-param> 
     <init-param> 
      <param-name>height</param-name> 
      <param-value>50</param-value> 
     </init-param> 
    </servlet> 
    <context-param> 
     <param-name>com.icesoft.faces.actionURLSuffix</param-name> 
     <param-value>.iface</param-value> 
    </context-param> 
    <context-param> 
     <param-name>com.icesoft.faces.debugDOMUpdate</param-name> 
     <param-value>false</param-value> 
    </context-param> 
    <context-param> 
     <param-name>com.icesoft.faces.delegateNonIface</param-name> 
     <param-value>true</param-value> 
    </context-param> 
    <context-param> 
     <param-name>com.icesoft.faces.concurrentDOMViews</param-name> 
     <param-value>true</param-value> 
    </context-param> 
    <context-param> 
     <param-name>com.icesoft.faces.synchronousUpdate</param-name> 
     <param-value>false</param-value> 
    </context-param> 
    <context-param> 
     <param-name>com.icesoft.faces.heartbeatRetries</param-name> 
     <param-value>10</param-value> 
    </context-param> 
    <context-param> 
     <param-name>com.icesoft.faces.standardRequestScope</param-name> 
     <param-value>false</param-value> 
    </context-param> 
    <context-param> 
     <param-name>com.icesoft.faces.component.OutputTextTag</param-name> 
     <param-value>false</param-value> 
    </context-param> 
    <context-param> 
     <param-name>com.icesoft.faces.uploadDirectory</param-name> 
     <param-value>upload</param-value> 
    </context-param> 
    <context-param> 
     <description>La cantidad en bytes de un archivo a subir por icefaces.</description> 
     <param-name>com.icesoft.faces.uploadMaxFileSize</param-name> 
     <param-value>4048576</param-value> 
    </context-param> 
    <context-param> 
     <param-name>com.sun.faces.enableRestoreView11Compatibility</param-name> 
     <param-value>true</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.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.STATE_SAVING_METHOD</param-name> 
     <param-value>server</param-value> 
    </context-param> 
    <context-param> 
     <param-name>contextConfigLocation</param-name> 
     <param-value> 
      classpath:app-web-context.xml 
      classpath:app-core-context.xml 
      classpath:app-ws-context.xml 
      classpath:app-dao-context.xml 
     </param-value> 
    </context-param> 
    <context-param> 
     <param-name>log4jConfigLocation</param-name> 
     <param-value>classpath:log4j.properties</param-value> 
    </context-param> 
    <listener> 
     <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> 
    </listener> 
    <servlet-mapping> 
     <servlet-name>Faces Servlet</servlet-name> 
     <url-pattern>/mainservlet/*</url-pattern> 
    </servlet-mapping> 
    <servlet-mapping> 
     <servlet-name>Blocking Servlet</servlet-name> 
     <url-pattern>/block/*</url-pattern> 
    </servlet-mapping> 
    <servlet-mapping> 
     <servlet-name>Persistent Faces Servlet</servlet-name> 
     <url-pattern>/xmlhttp/*</url-pattern> 
    </servlet-mapping> 
    <servlet-mapping> 
     <servlet-name>Persistent Faces Servlet</servlet-name> 
     <url-pattern>*.iface</url-pattern> 
    </servlet-mapping> 
    <servlet-mapping> 
     <servlet-name>uploadServlet</servlet-name> 
     <url-pattern>/uploadHtml</url-pattern> 
    </servlet-mapping> 
    <servlet-mapping> 
     <servlet-name>SimpleCaptcha</servlet-name> 
     <url-pattern>/simpleImg</url-pattern> 
    </servlet-mapping> 
    <servlet-mapping> 
     <servlet-name>StickyCaptcha</servlet-name> 
     <url-pattern>/stickyImg</url-pattern> 
    </servlet-mapping> 
    <servlet-mapping> 
     <servlet-name>ChineseCaptcha</servlet-name> 
     <url-pattern>/chineseImg</url-pattern> 
    </servlet-mapping> 
    <error-page> 
     <exception-type>java.lang.Throwable</exception-type> 
     <location>/checkService.jsp</location> 
    </error-page> 
</web-app> 

--- faces-config.xml中應用程序配置---

<application> 
    <view-handler>com.icesoft.faces.facelets.D2DFaceletViewHandler</view-handler> 
    <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver> 

    <locale-config> 
     <default-locale>es</default-locale> 
     <supported-locale>es</supported-locale> 
     <supported-locale>en</supported-locale> 
     <supported-locale>en_US</supported-locale> 
    </locale-config> 
</application> 

希望有人有一個答案。問候。

回答