• 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

Unable to generate error from Action class !

 
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
I have a JSP which consists of an Object tag in which i call another java action class. However, if the java action class throws an Exception i cannot forward the control to the Error jsp page which is supposed to display the required message.
Is it because i am accessing my action class through an Object tag? Btw i have to use the object tag because my action class is used to retrieve a Byte Array output stream and then print it on the screen rendered by the JSP.

Any suggestions ?
 
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"anix",

Welcome to JavaRanch. We don't have many rules here, but we do have a naming policy which we try to strictly enforce. Please re-read this document and edit your display name in order to comply. Thanks in advance, and we look forward to seeing you around the Ranch.
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm assuming that you are catching whatever exception is being thrown. Are you creating an ActionErrors or ActionMessages Object to hold the error?

In your action class where are you forwarding to in case there are any errors? Is the ActionForward correctly mapped in your struts-config.xml?

Many different questions come up because you didn't paste any code.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic