This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help with Display Tag in Struts

 
Liana Daughtry
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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.

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What doesn't displaytag do that you want it to?

(Note that this is not Struts-specific at this point.)
 
Liana Daughtry
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, if you're asking DisplayTag questions.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic