I have a form page that incorporates a quite a few form elements (generated from Struts tag lib) particularly select menus. I recently had to add a few more pulldown menus and found that doing so caused the page to not to be able to submit. I can get the page to display correctly, but when I hit submit I get an error message saying "javax.servlet.ServletException: BeanUtils.populate" and the root cause being "java.lang.reflect.InvocationTargetException: java.lang.OutOfMemoryError". I used JSP comment tags to comment out the pulldown menus I just added and trying to submit again and the page was able to go through to the ActionForm, so I think based on that I can pretty reasonably assume that the source of my problems is the extra form elements.
There's been some talk before about having problems w/ pages *displaying* because of too many tags (if I'm not mistaken, it's because the compiled servlet gets too big because the tag lib gets compiled in along w/ the other JSP code). I tried approaching it from that angle, but then I started wondering if that would apply in this situation - the page displays fine so there's no problems from the compiled JSP's standpoint. The only thing I'm left w/ is that the form is so big that the BeanUtils method eats up all the memory when it tries to populate the ActionForm via reflection. The form itself has 50-60 form elements (client requirement to keep the form that big...so no option of utilizing a multi-page workflow). I was thinking about breaking part of the form out into a different page and then doing an include (I believe I read before that doing that helps), but the Struts tag lib documentation said that the html form elements (select) are only valid when nested in a form tag body. Has anyone else run into this? I've done some pretty thorough Google searching and wasn't able to find any other options to pursue. Thanks in advance for anyones input. Btw, I'm running on Tomcat 4 (on W2K) and tried optimizing by setting Xms=128 and Xmx=160.