• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Accessing ActionErrors in JSP

 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd like to implement my own display of ActionErrors in a JSP, rather than use the <html:errors> tag. My question is: How to I access the ActionErrors from a JSP under Struts 1.0 (yeah, I know it's ancient, but I'm supporting a legacy app).
 
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
Grab them from the request (session?) the same way the tag does; using constants defined here.

If you need to refer to the source it's available via SVN here.
 
Adam Richards
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since I posted this, I realized the simpler way to do what I need is to specif a bundle attribute on the <html:errors> tag. The problem's a little complicated: I'm trying to incrementally convert a legacy app to a new error display style. So what I came up with is to use a separate resource bundle with the new errors.header and errors.footer strings. I think that will work, but now I can't get Struts to recognize that I'm deliberately creating an error (for testing). I'll start a new thread on that. But thanks for the quickly reply!
 
You will always be treated with dignity. Now, strip naked, get on the probulator and hold this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic