2011-09-07 52 views
1

我是JSF和facelets的初學者。我一直在嘗試創建一個使用facelet模板'master_layout.xhtml'的簡單登錄頁面。每次我點擊登錄,我得到的會話與鑽嘴魚科/ Facelets的,請您及時生成的幫助過期的錯誤Session使用facelets時出現錯誤

這裏是我的login.xhtml

<html xmlns="http://www.w3.org/1999/xhtml" 
    xmlns:ui="http://java.sun.com/jsf/facelets" 
    xmlns:ice="http://www.icesoft.com/icefaces/component" 
    xmlns:h="http://java.sun.com/jsf/html" 
    xmlns:f="http://java.sun.com/jsf/core"> 

    <ui:composition template="./master_layout.xhtml"> 

    <ui:define name="content"> 

      <h:form id="myform"> 
      <h:panelGrid columns="2" right="100px">  

      <h:outputText value="Username " style="font-size: 20px; color: #C0C0C0"/> 
      <h:inputText id="unameTxtBox" style="position: relative; width:157px"/> 


       <h:outputText value="Password " style="font-size: 20px; color:  #C0C0C0"/> 
       <h:inputSecret id="pwdTxtBox" style="position: relative; width: 157px; "/> 

       <h:commandButton id="loginButton" style="right:250px" value="LOG IN" action="#{loginManagedBean.validateLogin}"></h:commandButton> 
       </h:panelGrid>    
      </h:form>    
    </ui:define> 
    <ui:define name="footer"> 
    Copyright 2011- xyzzz Inc. 
    </ui:define> 
    </ui:composition> 
    </html> 
+0

什麼錯誤*確切*你有什麼和在哪裏?請提供包含錯誤全部副本的報價。還請告訴您正在使用哪個瀏覽器,以及cookies是否已正確傳輸。 – BalusC

回答

0

看你做的,似乎什麼是直轉發表單提交,以便表單提交會話失效(可能在您的操作中,或者有可能導致無效的過濾器),或者會話超時設置爲您的web.xml部署描述符中非常短的內容。你有沒有在你的web.xml文件中配置session-timeout元素?你有什麼價值?如果尚未設置,那麼您正在使用的容器將使用其默認值。

+0

我在我的web.xml中配置了session-timeout元素,並將其設置爲30。 – wantobegeek