Concerning your GnuJSP-question:
as long as GnuJSP doesn't implement the 0.92-specification, I think it
doesn't support this feature but I don't know it for sure.
Concerning your try-catch-question:
One of the main objectives of JSP is to separate the generation of dynamic
content from its presentation. This should be achieved by using the
component-centric tags in the first place and not by using the
scripting-centric tags (I think that's _the_ main idea behind JSP).
Therefore any scripting should be avoided and only be used when necessary.
Therefore try-catch clauses should be avoided as well. So using the
errorpage directive should be your first choice.
Concerning your question how to access the exception bean, I've found the
following in the 0.92 specification:
The exception Bean can only be accessed from a file specified by the
errorpage directive. Within the specified error
page, the exception Bean's information can be accessed just like any
other Bean's properties. That is, to access the
exception Bean's information, use the syntax for expressions (as in
<%= exception.getMessage %>) or the syntax for
displaying Bean properties (as in <DISPLAY
PROPERTY="exception:message" >).
The only difference between using the implicit exception Bean and
other Beans you might access, is that you don't need
to use a USEBEAN tag before accessing its properties -- that's all
handled automatically.
Here's some of the ways you can call that information from your
JavaServer Pages error page:
Java code
<% printStackTrace(out); %>
JavaServer Pages expression
<%= exception.getMessage %>
JavaServer Pages display
<DISPLAY PROPERTY="exception:message" >
hth
Volker Stiehl
-----Ursprungliche Nachricht-----
Von: Joe Shevland [SMTP:[EMAIL PROTECTED]]
Gesendet am: Dienstag, 2. Marz 1999 00:42
An: [EMAIL PROTECTED]
Betreff: Re: exception handeling in JSP
Hi,
(Sorry I started reading this thread a bit late... if there were archives I
could go through them.)
That sounds way cleaner than my try..catch blocks in the JSP. Will the
GnuJSP implementation support this? If so, do you think you could provide
just a little snippet of how you might reference this Exception bean or
perhaps a starting point for looking at its methods/values? Sincere
apologies if this is staring me in the face somewhere. Not looking for
someone to do my work, just a starting point.
Do these then negate the need for an enclosing try..catch?
Regards,
Joe.
--
Joe Shevland
Principal Consultant
Turnaround Solutions Pty. Ltd.
Ph: +61-03-6224-9146 * Fax: +61-03-6223-2556
--
Life is ours to be spent, not saved -D.H. Lawrence
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Volker Stiehl
> Sent: Monday, March 01, 1999 8:58 PM
> To: [EMAIL PROTECTED]
> Subject: AW: exception handeling in JSP
>
>
> You can use the ERRORPAGE directive: <%@ ERRORPAGE="pageURL" %>. This
> directive names the file to be displayed should an error codition be
> encountered. You can access a special bean inside the file pageURL points
> to: the exception bean. Without declaring it, you can access information
> about the most recent error. Once again: the information in the exception
> bean is _only_ accessible from the page designated by the ERRORPAGE
> directive.
>
> HTH
> Volker Stiehl
>
>
> -----Ursprungliche Nachricht-----
> Von: Werner Hennrich [SMTP:[EMAIL PROTECTED]]
> Gesendet am: Montag, 1. Marz 1999 10:33
> An: [EMAIL PROTECTED]
> Betreff: AW: exception handeling in JSP
>
> HI Guy
>
> I couldn't find a better way to deal with this either; too bad.
> I really hope the JSP 1.0 Spex will provide some simple means for that.
> Any non-programmer who has to work on such a JSP page will most
> propably not understand what is going on there and have a good
> reaon to dislike JSP.
>
> bye, Werner
>
> > -----Ursprungliche Nachricht-----
> > Von: A mailing list about Java Server Pages specification and reference
> > [mailto:[EMAIL PROTECTED]]Im Auftrag von Guy Piekarz
> > Gesendet am: Sonntag, 28. Februar 1999 14:41
> > An: [EMAIL PROTECTED]
> > Betreff: exception handeling in JSP
> >
> > Hi
> >
> > Is there a way that the 0.92 spec handles Exceptions e.g.:
> >
> > In the JSP page a <USEBEAN> tag defines a bean , and this bean throws
> > exception - in one of it's getXXX method
> > if I invoke this method from ths jsp I must use the try/catch
> > statement -
> > ( or else receives a compilation problem) -
> > this obligation really makes the page ugly -
> > maybe there is a way that exceptions thrown on the server redirect
the
> > client to an error page - or something...
> >
> >
> > GUY PIEKARZ
> > Tel : +972-9-7765161
> > email :[EMAIL PROTECTED]
> >
> > ==================================================================
> > =========
> > To unsubscribe, send email to [EMAIL PROTECTED] and include
> > in the body
> > of the message "signoff JSP-INTEREST". For general help, send email to
> > [EMAIL PROTECTED] and include in the body of the message "help".
> >
>
> ==================================================================
> =========
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff JSP-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
> ==================================================================
> =========
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff JSP-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".