Here is my web.xml
<display-name>firstJsf</display-name>
<welcome-file-list>
<welcome-file>/index.jsp</welcome-file>
</welcome-file-list>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name>
<param-value>20</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
<param-value>true</param-value>
</context-param>
<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>
Cagatay Civici wrote:
How do you specify it in web.xml, please post the context param config.
On Wed, Apr 22, 2009 at 2:48 PM, Alexey Koloskov
<[email protected] <mailto:[email protected]>> wrote:
Hello!
I'am new to MyFaces. I have written a simple program on jsf:
<h:form>
<h:inputText value="#{indexBean.name}"/>
<h:commandLink action="#{indexBean.submit}" value="Submit"/>
<h:outputText value="#{indexBean.processedName}"/>
</h:form>
and specify javax.faces.STATE_SAVING_METHOD=server in web.xml
But html code of the rendered page contains:
<input type="hidden" name="javax.faces.ViewState"
id="javax.faces.ViewState"
value="/0RL6JBt8cvqShFdUYKZJMFYhH3aK5oYI4toUZvNpTR+xCEIE1Uu9gLy21nZ6Z9tJC3z6WQ4pGdWJUwOkbTP+Q=="
/>
It looks like saving state on client, is it correct behavior or
I'm doing something wrong?
PS. I use MyFaces 1.2.6
Thank you,
Alexey