What does the web page where you get the java.io.NotSerializableException look 
like?

I tried playing around with the javax.faces.context.Flash features on the 
http://jsf2gae.appspot.com/ site.  The first page, flash.xhtml, has the 
following source:

<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"
     xmlns:f="http://java.sun.com/jsf/core";
     xmlns:h="http://java.sun.com/jsf/html";
     xmlns:ui="http://java.sun.com/jsf/facelets";>
   <h:head id="head">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <title>Example of JSF 2.0 Flash Functionality</title>
   </h:head>
   <h:body id="body">
      <h:form>
         <p>Value for Next Page
         <h:inputText value="#{flash.myValue}" size="25" maxLength="25"/></p>
         <p>
            <h:commandButton id="submit" action="flash_page2" 
                             value="Next page"/>
         </p>
      </h:form>
      
   </h:body>
</html>


The second page, flash_page2.xhtml, has the second contents:


<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"
     xmlns:f="http://java.sun.com/jsf/core";
     xmlns:h="http://java.sun.com/jsf/html";
     xmlns:ui="http://java.sun.com/jsf/facelets";>
   <h:head id="head">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <title>Example of JSF 2.0 Flash Functionality (Page 2)</title>
   </h:head>
   <h:body id="body">
      <p>You typed &quot;<h:outputText value="#{flash.myValue}"/>&quot;.</p>
      <p><h:outputLink value="flash.jsf">Start Over</h:outputLink></p>
   </h:body>
</html>

It works without generating any errors.

Derek

P.S. The "Flash" features are a great, quick way to pass data from one page to 
another!


On Dec 10, 2009, at 2:18 PM, Sector7B wrote:

> Hi, followed the examples below{} for JSF on GAE:
> 
> {https://sites.google.com/a/wildstartech.com/adventures-in-java/Java-
> Platform-Enterprise-Edition/JavaServer-Faces/sun-javaserver-faces-
> reference-implementation/configuring-jsf-20-to-run-on-the-google-
> appengine/javaserverfaces-20-and-google-app-engine-compatibility-
> issues
> 
> https://sites.google.com/a/wildstartech.com/adventures-in-java/Java-Platform-Enterprise-Edition/JavaServer-Faces/sun-javaserver-faces-reference-implementation/configuring-jsf-20-to-run-on-the-google-appengine
> 
> http://java.dzone.com/news/jsf2-configuration-google-app}
> 
> When i run locally, just the example given it works fine.
> When i run live i get this error:
> java.lang.RuntimeException: java.io.NotSerializableException:
> com.sun.faces.context.flash.ELFlash
> 
> searches come up with nothing for me?  It would seem the engine
> requires ELFlash to be serializable, but I guess its not.
> http://www.docjar.com/docs/api/com/sun/faces/context/flash/ELFlash.html
> 
> It looks like a lot of people have gotten this to work, it seems weird
> i can't fine an example of this breaking for someone else.
> 
> Any thoughts?
> 
> Thanks
> 
> web.xml:
> ....
>       <context-param>
>    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
>    <param-value>client</param-value>
>  </context-param>
>  <context-param>
>  <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
>    <param-value>.xhtml</param-value>
>  </context-param>
>      <context-param>
>        <param-name>com.sun.faces.expressionFactory</param-name>
>        <param-value>com.sun.el.ExpressionFactoryImpl</param-value>
>    </context-param>
>  <!-- GAE Bug 1506 JSP 2.1 API but 2.0 Implementation -->
>  <context-param>
>    <param-name>com.sun.faces.expressionFactory</param-name>
>    <param-value>com.sun.el.ExpressionFactoryImpl</param-value>
>  </context-param>
>  <context-param>
>    <description>
>      Set this flag to true if you want the JavaServer Faces
>      Reference Implementation to validate the XML in your
>      faces-config.xml resources against the DTD. Default
>      value is false.
>    </description>
>    <param-name>com.sun.faces.validateXml</param-name>
>    <param-value>true</param-value>
>  </context-param>
>  <!-- ***** Accommodate Single-Threaded Requirement of Google
> AppEngine  -->
>  <context-param>
>    <description>
>      When enabled, the runtime initialization and default
> ResourceHandler
>      implementation will use threads to perform their functions. Set
> this
>      value to false if threads aren't desired (as in the case of
> running
>      within the Google Application Engine).
> 
>      Note that when this option is disabled, the ResourceHandler will
> not
>      pick up new versions of resources when ProjectStage is
> development.
>    </description>
>    <param-name>com.sun.faces.enableThreading</param-name>
>    <param-value>false</param-value>
>  </context-param>
>  <!-- Seems like GAE 1.2.6 cannot handle server side session
> management. At least for JSF 2.0.1 -->
>  <context-param>
>    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
>    <param-value>client</param-value>
>  </context-param>
> <!-- Recommendation from GAE pages  -->
>  <context-param>
>    <param-name>javax.faces.PROJECT_STAGE</param-name>
>    <param-value>Production</param-value>
>  </context-param>
>  <!-- 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>
>  <servlet-mapping>
>    <servlet-name>Faces Servlet</servlet-name>
>    <url-pattern>/faces/*</url-pattern>
>    <url-pattern>*.jsf</url-pattern>
>  </servlet-mapping>
>  <session-config>
>    <session-timeout>30</session-timeout>
>  </session-config>
>  <welcome-file-list>
>    <welcome-file>index.jsp</welcome-file>
>    <welcome-file>index.xhtml</welcome-file>
>    <welcome-file>index.html</welcome-file>
>  </welcome-file-list>
> ....
> 
> --
> 
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine for Java" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine-java?hl=en.
> 
> 

--

You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.


Reply via email to