Subject: Re: Preservation of forms From: "Scott Danzig" <[EMAIL PROTECTED]> === Figured this one out too. Apparently, it's not good to store the label/value collections in the forms. You should store them as a session attribute and it'll be preserved just fine.
- Scott "Scott Danzig" <[EMAIL PROTECTED]> wrote in message news:a80l9o$emh$[EMAIL PROTECTED]... > I'm wondering if forms are preserved in the session attributes. Here's the > layout I have: > > LogonAction bean: > Create a SecondForm bean > Set various properties in the bean, prepopulating it > Set it as the value of the session attribute: "secondForm" > Specifies to load second.jsp > > second.jsp > Shows all the prepopulated values just fine. > Has an html:image button which leads to second.jsp > > Now should I be able to keep pressing this button, reloading the same form, > with the values in the form being preserved? One of the properties I try > setting in the form is two array lists used for an html:select statement. > When I click the button, it complains about one of the array lists being > null, as shown in the error below. In the SecondAction bean, if I take the > form it gives me and set these array list properties to new array lists > before returning to reload second.jsp, it stops complaining. Why should I > have to reload it? I made sure reset() wasn't touching it. > Here's that error... There's more to this I'll write afterwards: > > Error: 500 > Location: /MYPROJECT/second.jsp > Internal Servlet Error: > > javax.servlet.ServletException: Property listValues returned a null value > at > org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp > l.java:459) > at > _0002flocation_0002ejsplocation_jsp_17._jspService(_0002flocation_0002ejsplo > cation_jsp_17.java:1122) > at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at > org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja > va:130) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at > org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja > va:282) > at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) > at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) > at org.apache.tomcat.core.Handler.service(Handler.java:287) > at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) > at > org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81 > 2) > at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) > at > org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC > onnectionHandler.java:213) > at > org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) > at > org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) > at java.lang.Thread.run(Thread.java:484) > > Root cause: > javax.servlet.jsp.JspException: Property listValues returned a null value > at > org.apache.struts.taglib.html.OptionsTag.getIterator(OptionsTag.java:392) > at org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:284) > at > _0002flocation_0002ejsplocation_jsp_17._jspService(_0002flocation_0002ejsplo > cation_jsp_17.java:419) > at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at > org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja > va:130) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at > org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja > va:282) > at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) > at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) > at org.apache.tomcat.core.Handler.service(Handler.java:287) > at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) > at > org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81 > 2) > at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) > at > org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC > onnectionHandler.java:213) > at > org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) > at > org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) > at java.lang.Thread.run(Thread.java:484) > > Furthermore, if I have a third.jsp and have second.jsp go to that, and > third.jsp go back to second.jsp, even refilling the form with the arraylists > in SecondAction and ThirdAction doesn't work. It keeps saying they're null. > What am I missing that would allow the desired functionality? Thanks in > advance, and let me know if you need me to post more info. > > - Scott > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

