struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <ahardy.str...@cyberspaceroad.com>
Subject Re: nested:select submit problem
Date Fri, 19 Sep 2003 13:20:42 GMT
Hi Julien

it does not make sense if your error message was related to the absence 
of the lists for your drop-downs. The exception is coming from the 
RequestProcessor.processPopulate(), which is looking for something in 
your form bean to place the request parameters in.

Check your formfields as they appear in your HTML and see if you have 
equivalent nested or indexed or whatever properties to accept the 
request parameters.

As far as nested beans is concerned, if you put a hidden field into your 
page containing the count of the beans in your arraylist, you can then 
instantiate the required beans in your form's reset method.

HTH
Adam

On 09/19/2003 11:29 AM Gordenne Julien wrote:
> Hi all,
>  
> I'm trying to use nested:select tag to display a combo with the 
> selection coming from an ArrayList containing beans.
> This bean is an class created by myself, FieldAttributeCompositeView. 
> (see attachment)
> When the first page is displayed, no problem, the combo generated is 
> correct regarding the content of my ArrayList.
> So my list is not null and filled when coming for the first time into 
> the page.
> When I try to submit the page (html:form), I get a null pointer 
> exception because the ArrayList has been "lost".
>  
> 
> javax.servlet.ServletException: BeanUtils.populate
> 	at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
> 	at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
> 	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
> 	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
> 	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
> 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
> 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> 	at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
> 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
> 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
> 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 	at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
> 	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
> 	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
> 	at java.lang.Thread.run(Thread.java:534)
> 
> *cause mère*
> 
> java.lang.NullPointerException
> 	at org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.java:515)
> 	at org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.java:428)
> 	at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:770)
> 	at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801)
> 	at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881)
> 	at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
> 	at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)
> 	at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
> 	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
> 	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
> 	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
> 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
> 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> 	at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
> 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
> 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
> 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 	at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
> 	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
> 	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
> 	at java.lang.Thread.run(Thread.java:534)
> 
> 
> ------------------------------------------------------------------------
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration
1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
> <struts-config>
>     
>     <!-- ========== Data Source Configuration =============================== -->
>     <data-sources />
>     
>     <!-- ========== Form Bean Definitions ================================== -->
>     <form-beans type="org.apache.struts.action.ActionFormBean">
>         <form-bean name="FieldAttributesManagementForm" type="eu.europa.eurostat.presentation.form.FieldAttributesManagementForm"
/>
>     </form-beans>
>     
>     <!-- ========== Global Exception Definitions ============================== -->
>     <global-exceptions />
>     
>     <!-- ========== Global Forward Definitions =============================== -->
>     <global-forwards type="org.apache.struts.action.ActionForward" />
>     
>     <!-- ========== Action Mapping Definitions =============================== -->
>     <action-mappings type="org.apache.struts.action.ActionMapping">
>         <action
>             attribute="FieldAttributesManagementForm"
>             input="/jsp/mnuAdministration.jsp"
>             name="FieldAttributesManagementForm"
>             path="/fieldattributesmanagement"
>             type="eu.europa.eurostat.presentation.controller.CommonAction"
>             validate="false">
>             <forward name="success" path="/jsp/frmFieldAttributesManagement.jsp" />
>             <forward name="save" path="/jsp/frmFieldAttributesManagement.jsp" />
>         </action>
>     </action-mappings>
>     
>     <!-- ========== Controller Configuration ================================ -->
>     <controller />
>     
>     <!-- ========== Message Resources Definitions ============================ -->
>     
>     <!-- ========== Plug Ins Configuration ================================= -->
> </struts-config>	    
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org

-- 
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message