You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nagesh Kumar Suravarjula <ns...@cisco.com> on 2007/06/15 10:50:13 UTC
How to populate Collection element of FormBean on Submit
Hi
I have a Collection Element in my Form Bean whose elements are displayed in
a table in JSP . Also, I have a hidden variable in my JSP whose values are
coming from this Collection Element. I do have a reset method in my form
bean.
My requirement is that, when I submit the jsp, I get the below error :
[Servlet Error]-[BeanUtils.populate]: javax.servlet.ServletException:
BeanUtils.populate
at
com.netegrity.was511.filter.ServletFilter.doFilter(ServletFilter.java:75)
at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstance
Wrapper.java:132)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.
java:71)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(
WebAppRequestDispatcher.java:1162)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppReques
tDispatcher.java:676)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequest
Dispatcher.java:203)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker
java:294)
at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(C
achedInvocation.java:71)
at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletReq
uestProcessor.java:246)
at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListene
r.java:334)
at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.jav
a:56)
at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:652)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:458)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
How to overcome this situation ? How can I submit a collection at the time
of submit of a form ?
Your early reply is highly appreciated.
Thanks & Regards
Nagesh
Re: How to populate Collection element of FormBean on Submit
Posted by Nicolás Pace <ni...@gmail.com>.
On 6/15/07, Nagesh Kumar Suravarjula <ns...@cisco.com> wrote:
> Hi
>
> I have a Collection Element in my Form Bean whose elements are displayed in
> a table in JSP . Also, I have a hidden variable in my JSP whose values are
> coming from this Collection Element. I do have a reset method in my form
> bean.
>
> My requirement is that, when I submit the jsp, I get the below error :
>
> [Servlet Error]-[BeanUtils.populate]: javax.servlet.ServletException:
> BeanUtils.populate
> at
> com.netegrity.was511.filter.ServletFilter.doFilter(ServletFilter.java:75)
> at
> com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstance
> Wrapper.java:132)
> at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.
> java:71)
> at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(
> WebAppRequestDispatcher.java:1162)
> at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppReques
> tDispatcher.java:676)
> at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequest
> Dispatcher.java:203)
> at
> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
> at
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker
> java:294)
> at
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(C
> achedInvocation.java:71)
> at
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletReq
> uestProcessor.java:246)
> at
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListene
> r.java:334)
> at
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.jav
> a:56)
> at
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:652)
> at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:458)
> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
>
>
> How to overcome this situation ? How can I submit a collection at the time
> of submit of a form ?
You can do this by mapping the elements of the collection to html
forms using OGNL expressions.
Look here for an explanation on how struts+ognl do the mapping:
http://cwiki.apache.org/WW/ognl.html
Nickar
>
> Your early reply is highly appreciated.
>
> Thanks & Regards
> Nagesh
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org