• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help with Display Tag in Struts

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, if you're asking DisplayTag questions.
reply
    Bookmark Topic Watch Topic
  • New Topic