• 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

Problem with redirection from a JSP

 
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am calling a Java class from within the Object tag(of a JSP) using the <param src =""> tag. However if my java class throws any exception I am unable to send the control to another HTML page which is supposed to display the error messages.

A bit of the code snippet to give some understanding :

<object id="Pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="100%" height="92%" align="CENTER">
<param name="SRC" value="display.java" />
</object>

If display.java throws an exception, how can i forward the control to another HTML/JSP page from the catch block of the java code ??
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried putting one of these on your page?
<%@ page errorPage="" %>
 
Anirvan Majumdar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yea Marc, i did include the <@ page errorpage=""> tag. However, once the error is generated in the java class, it just gets caught and no error is generated for the JSP to direct to the error page. Any other suggestions??
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you see any error code (or stack trace) in your browser?

If yes, simply add the error code (or the exception) in the "<error-page>" section of your web.xml

Richard
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic