You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Anthony Hong <an...@gmail.com> on 2006/05/25 08:24:51 UTC

javax.faces.STATE_SAVING_METHOD doesn't work for form submting

I use myfaces with facelet.
I have a problem with javax.faces.STATE_SAVING_METHOD
If a use STATE_SAVING_METHOD=client everything works fine.
If a change STATE_SAVING_METHOD=server. page can be displayed. But for
form submit that invokes backend action function. It doesn't work.
But there is no error shown on page even I use <h:messages/> or in
backend console.

What's the problem with my web application?
Following is my web.xml

<?xml version="1.0" encoding="UTF-8"?>

<web-app 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>Razorsight</display-name>

    <!-- Use Documents Saved as *.xhtml -->
    <context-param>
        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
        <param-value>.xhtml</param-value>
    </context-param>

    <context-param>
        <param-name>facelets.LIBRARIES</param-name>
        <param-value>/WEB-INF/facelets/tomahawk.taglib.xml<param-value>
    </context-param>


    <!-- Special Debug Output for Development -->
    <context-param>
        <param-name>facelets.DEVELOPMENT</param-name>
        <param-value>true</param-value>
    </context-param>

    <context-param>
        <param-name>facelets.REFRESH_PERIOD</param-name>
        <param-value>2</param-value>
    </context-param>

    <context-param>
        <param-name>javax.faces.CONFIG_FILES</param-name>
        <param-value>/WEB-INF/faces-config-global.xml,/WEB-INF/faces-config-beans.xml,/WEB-INF/faces-config-navigation.xml,</param-value>
    </context-param>

    <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>server</param-value>
    </context-param>

    <context-param>
        <description>
            This parameter tells MyFaces if javascript code should be
allowed in the
            rendered HTML output.
            If javascript is allowed, command_link anchors will have
javascript code
            that submits the corresponding form.
            If javascript is not allowed, the state saving info and
nested parameters
            will be added as url parameters.
            Default: "true"
        </description>
        <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
        <param-value>true</param-value>
    </context-param>

    <context-param>
        <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
        <param-value>false</param-value>
    </context-param>

    <context-param>
        <description>
            If true, rendered HTML code will be formatted, so that it
is "human readable".
            i.e. additional line separators and whitespace will be
written, that do not
            influence the HTML code.
            Default: "true"
        </description>
        <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
        <param-value>true</param-value>
    </context-param>

    <context-param>
        <description>
            If true, a javascript function will be rendered that is
able to restore the
            former vertical scroll on every request. Convenient
feature if you have pages
            with long lists and you do not want the browser page to
always jump to the top
            if you trigger a link or button action that stays on the same page.
            Default: "false"
        </description>
        <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
        <param-value>true</param-value>
    </context-param>

    <filter>
        <filter-name>extensionsFilter</filter-name>
        <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
        <init-param>
            <description>Set the size limit for uploaded files.
                Format: 10 - 10 bytes
                10k - 10 KB
                10m - 10 MB
                1g - 1 GB
            </description>
            <param-name>uploadMaxFileSize</param-name>
            <param-value>2m</param-value>
        </init-param>
        <init-param>
            <description>Set the threshold size - files
                below this limit are stored in memory, files above
                this limit are stored on disk.

                Format: 10 - 10 bytes
                10k - 10 KB
                10m - 10 MB
                1g - 1 GB
            </description>
            <param-name>uploadThresholdSize</param-name>
            <param-value>64k</param-value>
        </init-param>
    </filter>

    <filter-mapping>
        <filter-name>extensionsFilter</filter-name>
        <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>extensionsFilter</filter-name>
        <url-pattern>/faces/*</url-pattern>
    </filter-mapping>

    <!-- Faces Servlet -->
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <!-- extension mapping -->
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>

    <welcome-file-list>
        <welcome-file>login.jsf</welcome-file>
    </welcome-file-list>
</web-app>



-- 

Anthony Hong

Re: javax.faces.STATE_SAVING_METHOD doesn't work for form submting

Posted by Anthony Hong <an...@gmail.com>.
Really? Rogerio,
Currently I use facelte 1.15. Do you know which version works?

On 6/17/06, pokkie <po...@gmail.com> wrote:
>
> Actually I am not using facelets, but in my case I believe the problem is
> that my component is embedded within  a tabbedPanel
> --
> View this message in context: http://www.nabble.com/javax.faces.STATE_SAVING_METHOD-doesn%27t-work-for-form-submting-t1679622.html#a4913792
> Sent from the MyFaces - Users forum at Nabble.com.
>
>


-- 

Anthony Hong

Re: javax.faces.STATE_SAVING_METHOD doesn't work for form submting

Posted by pokkie <po...@gmail.com>.
Actually I am not using facelets, but in my case I believe the problem is
that my component is embedded within  a tabbedPanel
--
View this message in context: http://www.nabble.com/javax.faces.STATE_SAVING_METHOD-doesn%27t-work-for-form-submting-t1679622.html#a4913792
Sent from the MyFaces - Users forum at Nabble.com.


Re: javax.faces.STATE_SAVING_METHOD doesn't work for form submting

Posted by Rogerio Pereira <ro...@gmail.com>.
This problem affect developers that uses facelets and can be solved by
upgrading to a newer version of facelets.

2006/6/16, pokkie <po...@gmail.com>:
>
>
> I am experiencing exactly the same problem. Have you found a solution by
> any
> chance?
> --
> View this message in context:
> http://www.nabble.com/javax.faces.STATE_SAVING_METHOD-doesn%27t-work-for-form-submting-t1679622.html#a4910408
> Sent from the MyFaces - Users forum at Nabble.com.
>
>


-- 
Yours truly (Atenciosamente),

Rogério

Re: javax.faces.STATE_SAVING_METHOD doesn't work for form submting

Posted by pokkie <po...@gmail.com>.
I am experiencing exactly the same problem. Have you found a solution by any
chance?
--
View this message in context: http://www.nabble.com/javax.faces.STATE_SAVING_METHOD-doesn%27t-work-for-form-submting-t1679622.html#a4910408
Sent from the MyFaces - Users forum at Nabble.com.