I am working on a test app trying to learn Struts and other JAVA components. My App is working and it's sole purpose is to produce a report (HTML table). One one the things I'd like to experiment with is to give the user the option to export the HTML table to an Excel document. I have seen a lot of examples, but none seem to fit my situation. My current JSP that will display the report in HTML is below. I would like to know if there is a way I can access the MsgDetail object and build a table using the Display tags.
Note: I wrote this JSP before I knew anything about logic and bean tags in case you are wondering. I have seen cleaner methods I could have used. Nevertheless, I am hoping this code is salvageable.
(Note that this is not Struts-specific at this point.)
Joined: Mar 27, 2010
I just don't know how I should go about using the Display Tags to access the arraylist that is referenced by the errmsgArr attribute.
<% ArrayList errList = (ArrayList) request.getAttribute("errmsgArr");
MsgDetails tempd = (MsgDetails)errList.get(i);
I wasn't sure if I was going to have to add some logic for a new action or form which is why I posted the question in the Struts forum. Right now my action is forwarding to the JSP page below. The errmsgArr is not stored in an action form. It is just a java bean. Would another forum be more suitable?