Re: how to call a jsp error page from a servlet

2004-06-11 Thread kapil dattatraya shewate
Hi

i want to call a jsp error page from a servlet how to do 
  

Hi

i want to call a jsp error page from a servlet how to do 

Re: How to set an error page

2002-12-12 Thread Michael Risser
http://www.jedit.org

-Original Message-
From: Anindya [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 12, 2002 3:01 AM
To: [EMAIL PROTECTED]
Subject: Re: How to set an error page


can somebody prescribe me a very useful JSP IDE/Editor

thanks & regards ,

Anindya

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: How to set an error page

2002-12-12 Thread Anindya
can somebody prescribe me a very useful JSP IDE/Editor

thanks & regards ,

Anindya

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: How to set an error page

2002-12-11 Thread Mattias Jiderhamn
<%@ page errorPage="/500.html" %>

> -Original Message-
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Eric Cho
> Sent: Thursday, December 12, 2002 1:07 AM
> To: [EMAIL PROTECTED]
> Subject: Re: How to set an error page
>
>
> I too have this problem.  It works on my workstation environment
> (Websphere
> Studio) but it doesn't work after I've deployed it to the server
> (WebSphere
> 4.01.021 on OS/390).  Are there any other ways to declare the error page
> other than in the web.xml?
>
> Thanks,
> Eric
>
> -Original Message-
> From: Deepak [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 11, 2002 3:42 PM
> To: [EMAIL PROTECTED]
> Subject: Re: How to set an error page
>
>
> Dear Daniel
>
> I regret to say it didnt work.
> I am still getting the ugly error 500 message on the browser.
>
> Here is my web.xml
>  
> 
> login.jsp
> 
>
> 
> 500
> /500.html
> 
>
> can you spot any mistakes?
> Please help
>
> regards
> Deepak
>
> On Wednesday 11 December 2002 12:31 pm, you wrote:
> > Deepak,
> >
> > Add a file called 500.html which can display this "An unforseen error
> > occured ,please try again" message
> >
> > Place this in /webapps/projdir/500.html
> >
> > Add these lines in your web.xml file in appropriate position according
> > to DTD
> >
> > 
> >
> >   500
> >
> >
> >   /500.html
> >
> > 
> >
> > You should see Your message...!
> > Cheers
> >  Daniel Jayapaul.E
> >
> >  Daniel Jayapaul.E(Java Team Leader)
> > Software Park, 6th Floor, 99/29, Moo 4,
> > Chaengwattana Road, Klong Gleua, Pakred,
> > Nonthaburi 1120,Thailand.
> > Email: [EMAIL PROTECTED]
> > http://www.mustang-technologies.com
> > Tel: +66 2 583- 6161-4 Fax: +662 583 6535
> > Mobile +66 9 810 1157
> >
> > -Original Message-
> > From: A mailing list about Java Server Pages specification and reference
> > [mailto:[EMAIL PROTECTED]] On Behalf Of Deepak
> > Sent: Wednesday, December 11, 2002 1:18 PM
> > To: [EMAIL PROTECTED]
> > Subject: How to set an error page
> >
> > Hi folks
> >
> > I have a jsp page which is experiencing some "Error 500" s
> > Instead of the ugly messages how can I show the user a simple message
> > such as
> > "An unforseen error occured ,please try again"
> >
> > Kindly send in your suggestions.
> >
> > Thanx in advance
> > Deepak
> >
> > 
> > ===
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> > DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://archives.java.sun.com/jsp-interest.html
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.jsp
> >  http://www.jguru.com/faq/index.jsp
> >  http://www.jspinsider.com
> >
> >
> ==
> =
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set
> > JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be
> found at:
> >
> >  http://archives.java.sun.com/jsp-interest.html
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.jsp
> >  http://www.jguru.com/faq/index.jsp
> >  http://www.jspinsider.com
>
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com
>
>
> **
> 
> The contents of this email and any attachments are confidential.
> It is intend

FW: How to set an error page

2002-12-11 Thread Amit Ghaste
Sorry abt that...

i sent it to the personal mail by mistake

-Original Message-
From: Amit Ghaste [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 8:33 PM
To: Martin
Subject: RE: How to set an error page


I belive u set the error page...like for 400 and 500 error pages in the WEB
SERVER not in the jsp or in the app server

look up ur web server's documentation for doing so...

hope that helps
Amit

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Martin
Sent: Sunday, May 12, 2002 6:25 PM
To: [EMAIL PROTECTED]
Subject: Re: How to set an error page


Eric:
yes..you declare your errorpage In your JSP..
Regards,
Martin
- Original Message -
From: "Eric Cho" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 11, 2002 8:07 PM
Subject: Re: How to set an error page


> I too have this problem.  It works on my workstation environment
(Websphere
> Studio) but it doesn't work after I've deployed it to the server
(WebSphere
> 4.01.021 on OS/390).  Are there any other ways to declare the error page
> other than in the web.xml?
>
> Thanks,
> Eric
>
> -Original Message-
> From: Deepak [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 11, 2002 3:42 PM
> To: [EMAIL PROTECTED]
> Subject: Re: How to set an error page
>
>
> Dear Daniel
>
> I regret to say it didnt work.
> I am still getting the ugly error 500 message on the browser.
>
> Here is my web.xml
>  
> 
> login.jsp
> 
>
> 
> 500
> /500.html
> 
>
> can you spot any mistakes?
> Please help
>
> regards
> Deepak
>
> On Wednesday 11 December 2002 12:31 pm, you wrote:
> > Deepak,
> >
> > Add a file called 500.html which can display this "An unforseen error
> > occured ,please try again" message
> >
> > Place this in /webapps/projdir/500.html
> >
> > Add these lines in your web.xml file in appropriate position according
> > to DTD
> >
> > 
> >
> >   500
> >
> >
> >   /500.html
> >
> > 
> >
> > You should see Your message...!
> > Cheers
> >  Daniel Jayapaul.E
> >
> >  Daniel Jayapaul.E(Java Team Leader)
> > Software Park, 6th Floor, 99/29, Moo 4,
> > Chaengwattana Road, Klong Gleua, Pakred,
> > Nonthaburi 1120,Thailand.
> > Email: [EMAIL PROTECTED]
> > http://www.mustang-technologies.com
> > Tel: +66 2 583- 6161-4 Fax: +662 583 6535
> > Mobile +66 9 810 1157
> >
> > -Original Message-
> > From: A mailing list about Java Server Pages specification and reference
> > [mailto:[EMAIL PROTECTED]] On Behalf Of Deepak
> > Sent: Wednesday, December 11, 2002 1:18 PM
> > To: [EMAIL PROTECTED]
> > Subject: How to set an error page
> >
> > Hi folks
> >
> > I have a jsp page which is experiencing some "Error 500" s
> > Instead of the ugly messages how can I show the user a simple message
> > such as
> > "An unforseen error occured ,please try again"
> >
> > Kindly send in your suggestions.
> >
> > Thanx in advance
> > Deepak
> >
> > 
> > ===
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> > DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://archives.java.sun.com/jsp-interest.html
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.jsp
> >  http://www.jguru.com/faq/index.jsp
> >  http://www.jspinsider.com
> >
> >
>
===
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set
> > JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found
at:
> >
> >  http://archives.java.sun.com/jsp-interest.html
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.jsp
> >  http://www.jguru.com/faq/index.jsp
> >  http://www.jspinsider.com
>
>
===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For diges

Re: How to set an error page

2002-12-11 Thread Martin
Eric:
yes..you declare your errorpage In your JSP..
Regards,
Martin
- Original Message -
From: "Eric Cho" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 11, 2002 8:07 PM
Subject: Re: How to set an error page


> I too have this problem.  It works on my workstation environment
(Websphere
> Studio) but it doesn't work after I've deployed it to the server
(WebSphere
> 4.01.021 on OS/390).  Are there any other ways to declare the error page
> other than in the web.xml?
>
> Thanks,
> Eric
>
> -Original Message-
> From: Deepak [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 11, 2002 3:42 PM
> To: [EMAIL PROTECTED]
> Subject: Re: How to set an error page
>
>
> Dear Daniel
>
> I regret to say it didnt work.
> I am still getting the ugly error 500 message on the browser.
>
> Here is my web.xml
>  
> 
> login.jsp
> 
>
> 
> 500
> /500.html
> 
>
> can you spot any mistakes?
> Please help
>
> regards
> Deepak
>
> On Wednesday 11 December 2002 12:31 pm, you wrote:
> > Deepak,
> >
> > Add a file called 500.html which can display this "An unforseen error
> > occured ,please try again" message
> >
> > Place this in /webapps/projdir/500.html
> >
> > Add these lines in your web.xml file in appropriate position according
> > to DTD
> >
> > 
> >
> >   500
> >
> >
> >   /500.html
> >
> > 
> >
> > You should see Your message...!
> > Cheers
> >  Daniel Jayapaul.E
> >
> >  Daniel Jayapaul.E(Java Team Leader)
> > Software Park, 6th Floor, 99/29, Moo 4,
> > Chaengwattana Road, Klong Gleua, Pakred,
> > Nonthaburi 1120,Thailand.
> > Email: [EMAIL PROTECTED]
> > http://www.mustang-technologies.com
> > Tel: +66 2 583- 6161-4 Fax: +662 583 6535
> > Mobile +66 9 810 1157
> >
> > -Original Message-
> > From: A mailing list about Java Server Pages specification and reference
> > [mailto:[EMAIL PROTECTED]] On Behalf Of Deepak
> > Sent: Wednesday, December 11, 2002 1:18 PM
> > To: [EMAIL PROTECTED]
> > Subject: How to set an error page
> >
> > Hi folks
> >
> > I have a jsp page which is experiencing some "Error 500" s
> > Instead of the ugly messages how can I show the user a simple message
> > such as
> > "An unforseen error occured ,please try again"
> >
> > Kindly send in your suggestions.
> >
> > Thanx in advance
> > Deepak
> >
> > 
> > ===
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> > DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://archives.java.sun.com/jsp-interest.html
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.jsp
> >  http://www.jguru.com/faq/index.jsp
> >  http://www.jspinsider.com
> >
> >
>
===
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set
> > JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found
at:
> >
> >  http://archives.java.sun.com/jsp-interest.html
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.jsp
> >  http://www.jguru.com/faq/index.jsp
> >  http://www.jspinsider.com
>
>
===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com
>
>
>

**
> The contents of this email and any attachments are confidential.
> It is intended for the named recipient(s) only.
> If you have received this email in error please notify the system 

Re: How to set an error page

2002-12-11 Thread Eric Cho
I too have this problem.  It works on my workstation environment (Websphere
Studio) but it doesn't work after I've deployed it to the server (WebSphere
4.01.021 on OS/390).  Are there any other ways to declare the error page
other than in the web.xml?

Thanks,
Eric

-Original Message-
From: Deepak [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 3:42 PM
To: [EMAIL PROTECTED]
Subject: Re: How to set an error page


Dear Daniel

I regret to say it didnt work.
I am still getting the ugly error 500 message on the browser.

Here is my web.xml
 

login.jsp



500
/500.html

   
can you spot any mistakes?
Please help

regards
Deepak

On Wednesday 11 December 2002 12:31 pm, you wrote:
> Deepak,
>
> Add a file called 500.html which can display this "An unforseen error
> occured ,please try again" message
>
> Place this in /webapps/projdir/500.html
>
> Add these lines in your web.xml file in appropriate position according
> to DTD
>
> 
>
>   500
>
>
>   /500.html
>
> 
>
> You should see Your message...!
> Cheers
>  Daniel Jayapaul.E
>
>  Daniel Jayapaul.E(Java Team Leader)
> Software Park, 6th Floor, 99/29, Moo 4,
> Chaengwattana Road, Klong Gleua, Pakred,
> Nonthaburi 1120,Thailand.
> Email: [EMAIL PROTECTED]
> http://www.mustang-technologies.com
> Tel: +66 2 583- 6161-4 Fax: +662 583 6535
> Mobile +66 9 810 1157
>
> -Original Message-
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]] On Behalf Of Deepak
> Sent: Wednesday, December 11, 2002 1:18 PM
> To: [EMAIL PROTECTED]
> Subject: How to set an error page
>
> Hi folks
>
> I have a jsp page which is experiencing some "Error 500" s
> Instead of the ugly messages how can I show the user a simple message
> such as
> "An unforseen error occured ,please try again"
>
> Kindly send in your suggestions.
>
> Thanx in advance
> Deepak
>
> 
> ===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com
>
>
===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com


**
The contents of this email and any attachments are confidential.
It is intended for the named recipient(s) only.
If you have received this email in error please notify the system manager or  the
sender immediately and do not disclose the contents to any one or make copies.

** eSafe scanned this email for viruses, vandals and malicious content **
**

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: How to set an error page

2002-12-11 Thread Deepak
Dear Daniel

I regret to say it didnt work.
I am still getting the ugly error 500 message on the browser.

Here is my web.xml
 

login.jsp



500
/500.html

   
can you spot any mistakes?
Please help

regards
Deepak

On Wednesday 11 December 2002 12:31 pm, you wrote:
> Deepak,
>
> Add a file called 500.html which can display this "An unforseen error
> occured ,please try again" message
>
> Place this in /webapps/projdir/500.html
>
> Add these lines in your web.xml file in appropriate position according
> to DTD
>
> 
>
>   500
>
>
>   /500.html
>
> 
>
> You should see Your message...!
> Cheers
>  Daniel Jayapaul.E
>
>  Daniel Jayapaul.E(Java Team Leader)
> Software Park, 6th Floor, 99/29, Moo 4,
> Chaengwattana Road, Klong Gleua, Pakred,
> Nonthaburi 1120,Thailand.
> Email: [EMAIL PROTECTED]
> http://www.mustang-technologies.com
> Tel: +66 2 583- 6161-4 Fax: +662 583 6535
> Mobile +66 9 810 1157
>
> -Original Message-
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]] On Behalf Of Deepak
> Sent: Wednesday, December 11, 2002 1:18 PM
> To: [EMAIL PROTECTED]
> Subject: How to set an error page
>
> Hi folks
>
> I have a jsp page which is experiencing some "Error 500" s
> Instead of the ugly messages how can I show the user a simple message
> such as
> "An unforseen error occured ,please try again"
>
> Kindly send in your suggestions.
>
> Thanx in advance
> Deepak
>
> 
> ===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com
>
> ===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: How to set an error page

2002-12-10 Thread Deepak
Dear Daniel...

Thank you very much.
I will try this out.

regards
Deepak

On Wednesday 11 December 2002 12:31 pm, you wrote:
> Deepak,
>
> Add a file called 500.html which can display this "An unforseen error
> occured ,please try again" message
>
> Place this in /webapps/projdir/500.html
>
> Add these lines in your web.xml file in appropriate position according
> to DTD
>
> 
>
>   500
>
>
>   /500.html
>
> 
>
> You should see Your message...!
> Cheers
>  Daniel Jayapaul.E
>
>  Daniel Jayapaul.E(Java Team Leader)
> Software Park, 6th Floor, 99/29, Moo 4,
> Chaengwattana Road, Klong Gleua, Pakred,
> Nonthaburi 1120,Thailand.
> Email: [EMAIL PROTECTED]
> http://www.mustang-technologies.com
> Tel: +66 2 583- 6161-4 Fax: +662 583 6535
> Mobile +66 9 810 1157
>
> -Original Message-
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]] On Behalf Of Deepak
> Sent: Wednesday, December 11, 2002 1:18 PM
> To: [EMAIL PROTECTED]
> Subject: How to set an error page
>
> Hi folks
>
> I have a jsp page which is experiencing some "Error 500" s
> Instead of the ugly messages how can I show the user a simple message
> such as
> "An unforseen error occured ,please try again"
>
> Kindly send in your suggestions.
>
> Thanx in advance
> Deepak
>
> 
> ===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com
>
> ===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: How to set an error page

2002-12-10 Thread Daniel
Deepak,

Add a file called 500.html which can display this "An unforseen error
occured ,please try again" message

Place this in /webapps/projdir/500.html

Add these lines in your web.xml file in appropriate position according
to DTD


   
  500
   
   
  /500.html
   


You should see Your message...!
Cheers
 Daniel Jayapaul.E

 Daniel Jayapaul.E(Java Team Leader)
Software Park, 6th Floor, 99/29, Moo 4,
Chaengwattana Road, Klong Gleua, Pakred,
Nonthaburi 1120,Thailand.
Email: [EMAIL PROTECTED]
http://www.mustang-technologies.com
Tel: +66 2 583- 6161-4 Fax: +662 583 6535
Mobile +66 9 810 1157

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]] On Behalf Of Deepak
Sent: Wednesday, December 11, 2002 1:18 PM
To: [EMAIL PROTECTED]
Subject: How to set an error page

Hi folks

I have a jsp page which is experiencing some "Error 500" s
Instead of the ugly messages how can I show the user a simple message
such as
"An unforseen error occured ,please try again"

Kindly send in your suggestions.

Thanx in advance
Deepak


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



How to set an error page

2002-12-10 Thread Deepak
Hi folks

I have a jsp page which is experiencing some "Error 500" s
Instead of the ugly messages how can I show the user a simple message such as
"An unforseen error occured ,please try again"

Kindly send in your suggestions.

Thanx in advance
Deepak

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Dynamic parameter to error page

2002-08-29 Thread Alireza Nahavandi

Thank you Hans and Campano for you responses. I did that with
response.setAttribute, it worked fine...

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Hans Bergsten
Sent: Thursday, August 29, 2002 1:16 PM
To: [EMAIL PROTECTED]
Subject: Re: Dynamic parameter to error page


Campano, Troy wrote:
> What I did was I needed my errorPage to catch my SQL, so someone
 > recommended storing the SQL in a session just before I executed it
 > so that SQL Session could be read on the errorPage. That worked
 > for me.

Sure, it works in most cases. But the session scope is "wider" than
what you need for this, and it may give unexpected results if you
happen to get two requests that fail for different reasons from the
same user (part of the same session, so they overwrite each others
error data). The request scope is much more appropriate for this
kind of thing.

Hans

> -Original Message-
> From: Hans Bergsten [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 29, 2002 12:20 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Dynamic parameter to error page
>
>
> Alireza Nahavandi wrote:
>
>>Hi All,
>>
>>I need to pass a dynamic parameter to an error page :
>>
>><%@ page errorPage="error.jsp?fn=b.jsp&id=" %>
>>
>>Is there any way to make  dynamic ?
>
>
> No, the page directive is not evaulated at runtime (only translation
time). To pass dynamic data to an error page, store it in the request scope
instead. With JSTL, you can use something like this:
>
>  value="${someExpressionWithTheIdValue}" />
>
> The "id" variable is then available to EL expressions in the error page.
>
> If you're using a JSP 1.1 container (and therefore can not use JSTL), you
can use , a custom action or a scriptlet to store the "id" in
the request scope instead:
>
><% request.setAttribute("id", aScriptingVariableWithTheId); %>
>
> Hans
> --
> Hans Bergsten   [EMAIL PROTECTED]
> Gefion Software http://www.gefionsoftware.com
> JavaServer Pageshttp://TheJSPBook.com
>
>
===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set
JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com
>
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com
>


--
Hans Bergsten   [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
JavaServer Pageshttp://TheJSPBook.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Dynamic parameter to error page

2002-08-29 Thread Hans Bergsten

Campano, Troy wrote:
> What I did was I needed my errorPage to catch my SQL, so someone
 > recommended storing the SQL in a session just before I executed it
 > so that SQL Session could be read on the errorPage. That worked
 > for me.

Sure, it works in most cases. But the session scope is "wider" than
what you need for this, and it may give unexpected results if you
happen to get two requests that fail for different reasons from the
same user (part of the same session, so they overwrite each others
error data). The request scope is much more appropriate for this
kind of thing.

Hans

> -Original Message-
> From: Hans Bergsten [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 29, 2002 12:20 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Dynamic parameter to error page
>
>
> Alireza Nahavandi wrote:
>
>>Hi All,
>>
>>I need to pass a dynamic parameter to an error page :
>>
>><%@ page errorPage="error.jsp?fn=b.jsp&id=" %>
>>
>>Is there any way to make  dynamic ?
>
>
> No, the page directive is not evaulated at runtime (only translation time). To pass 
>dynamic data to an error page, store it in the request scope instead. With JSTL, you 
>can use something like this:
>
>  value="${someExpressionWithTheIdValue}" />
>
> The "id" variable is then available to EL expressions in the error page.
>
> If you're using a JSP 1.1 container (and therefore can not use JSTL), you can use 
>, a custom action or a scriptlet to store the "id" in the request scope 
>instead:
>
><% request.setAttribute("id", aScriptingVariableWithTheId); %>
>
> Hans
> --
> Hans Bergsten   [EMAIL PROTECTED]
> Gefion Software http://www.gefionsoftware.com
> JavaServer Pageshttp://TheJSPBook.com
>
> ===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For 
>digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some 
>relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com
>
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com
>


--
Hans Bergsten   [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
JavaServer Pageshttp://TheJSPBook.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Dynamic parameter to error page

2002-08-29 Thread Campano, Troy

What I did was I needed my errorPage to catch my SQL, so someone recommended storing 
the SQL in a session just before I executed it so that SQL Session could be read on 
the errorPage. That worked for me.


thanks!


Troy Campano


-Original Message-
From: Hans Bergsten [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, August 29, 2002 12:20 PM
To: [EMAIL PROTECTED]
Subject: Re: Dynamic parameter to error page


Alireza Nahavandi wrote:
> Hi All,
>
> I need to pass a dynamic parameter to an error page :
>
> <%@ page errorPage="error.jsp?fn=b.jsp&id=" %>
>
> Is there any way to make  dynamic ?

No, the page directive is not evaulated at runtime (only translation time). To pass 
dynamic data to an error page, store it in the request scope instead. With JSTL, you 
can use something like this:

   

The "id" variable is then available to EL expressions in the error page.

If you're using a JSP 1.1 container (and therefore can not use JSTL), you can use 
, a custom action or a scriptlet to store the "id" in the request scope 
instead:

   <% request.setAttribute("id", aScriptingVariableWithTheId); %>

Hans
--
Hans Bergsten   [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
JavaServer Pageshttp://TheJSPBook.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For 
digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some 
relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

==To 
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Dynamic parameter to error page

2002-08-29 Thread Hans Bergsten

Alireza Nahavandi wrote:
> Hi All,
>
> I need to pass a dynamic parameter to an error page :
>
> <%@ page errorPage="error.jsp?fn=b.jsp&id=" %>
>
> Is there any way to make  dynamic ?

No, the page directive is not evaulated at runtime (only translation
time). To pass dynamic data to an error page, store it in the request
scope instead. With JSTL, you can use something like this:

   

The "id" variable is then available to EL expressions in the error page.

If you're using a JSP 1.1 container (and therefore can not use JSTL),
you can use , a custom action or a scriptlet to store
the "id" in the request scope instead:

   <% request.setAttribute("id", aScriptingVariableWithTheId); %>

Hans
--
Hans Bergsten   [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
JavaServer Pageshttp://TheJSPBook.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Dynamic parameter to error page

2002-08-29 Thread Alireza Nahavandi

Hi All,

I need to pass a dynamic parameter to an error page :

<%@ page errorPage="error.jsp?fn=b.jsp&id=" %>

Is there any way to make  dynamic ?

Thank you.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Application-wide error page.

2002-08-14 Thread Martin Gainty
John check out %CATALINA_HOME%\webapps\examples\jsp\erroryou can execute the sample with http://localhost:8080/examples/jsp/error/error.htmlGood Luck,Martin Gainty



__

Disclaimer and confidentiality note

Everything in this e-mail and any attachments relating to the official business of Laconia Data Systems (LDS) is proprietary to the company. It is confidential, legally privileged and protected by law. LDS does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of LDS. 

The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way.



LDS can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference.

 ___

 











>From: Anoop Kumar V <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: Application-wide error page.
>Date: Wed, 14 Aug 2002 10:37:56 -0400
>MIME-Version: 1.0
>Received: from [192.18.99.108] by hotmail.com (3.2) with ESMTP id MHotMailBF23B65A00794004321EC012636CE4690; Wed, 14 Aug 2002 07:38:51 -0700
>Received: from swjscmail1 (swjscmail1.Sun.COM [192.18.99.107])by swjscmail2.java.sun.com (Postfix) with ESMTPid BBB5323055; Wed, 14 Aug 2002 08:35:53 -0600 (MDT)
>Received: from JAVA.SUN.COM by JAVA.SUN.COM (LISTSERV-TCP/IP release 1.8d) with spool id 2429726 for [EMAIL PROTECTED]; Wed, 14 Aug 2002 08:34:09 -0600
>Received: from andromeda.sapient.com (207-121-0-68.sapient.com [207.121.0.68]) by swjscmail1.java.sun.com (Postfix) with ESMTP id CFBD54835 for <[EMAIL PROTECTED]>; Wed, 14 Aug 2002 08:34:08 -0600 (MDT)
>Received: by andromeda.sapient.com with Internet Mail Service (5.5.2653.19) id ; Wed, 14 Aug 2002 10:37:58 -0400
>From [EMAIL PROTECTED] Wed, 14 Aug 2002 07:39:54 -0700
>Delivered-To: [EMAIL PROTECTED]
>X-Mailer: Internet Mail Service (5.5.2653.19)
>Message-ID: <[EMAIL PROTECTED]>
>Sender: A mailing list about Java Server Pages specification and reference <[EMAIL PROTECTED]>
>
>u can use an error-page directive.
>In tomcat examples, there is a particular example which shows this.
>
> <%@ page errorPage="errorpge.jsp" %>
>You will hv to include this in every jsp u wish to redirect to an error page
>like this.
>
>-anoop
>
>-Original Message-
>From: John Ghidiu [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, August 14, 2002 7:44 PM
>To: [EMAIL PROTECTED]
>Subject: Application-wide error page.
>
>
>Hi All,
>
>I am writing my first web application, and I need some help. I have spent
>most of the morning looking for the answer to what should be a simple
>problem. I would like to have an error page that is global, in terms of the
>application. That is, whenever any type of error occurs, I would like some
>specific error page to be displayed. I have put
>java.lang.Throwable in the web.xml, but that does
>not work for http errors, such as 404. I realize that I could enumerate all
>the error codes within sections, but that seems tedious and it
>just seems that there should be a better way. I am currently using Tomcat
>4.1.8, and I would like to keep the solution vendor independent. Any ideas?
>
>Regards,
>John
>
>John Ghidiu
>Benderson Development Company Inc.
>[EMAIL PROTECTED]
>(716) 878-9376
>
>==To
>unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
> http://archives.java.sun.com/jsp-interest.html
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.jsp
> http://www.jguru.com/faq/index.jsp
> http://www.jspinsider.com
>
>===
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
> http://archives.java.sun.com/jsp-interest.html
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.jsp
> http://www.jguru.com/faq/index.jsp
> http://www.jspinsider.com
Chat with friends online, try MSN Messenger: Click Here

===
To unsubs

Re: Application-wide error page.

2002-08-14 Thread John Ghidiu

Yes, but if I understand you correctly, I would have to enumerate all HTTP errors in 
the web.xml file, right?

John

Regards,
John

John Ghidiu
Benderson Development Company Inc.
[EMAIL PROTECTED]
(716) 878-9376


-Original Message-
From: Joseph Ottinger [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 14, 2002 11:17
To: [EMAIL PROTECTED]
Subject: Re: [JSP-INTEREST] Application-wide error page.


You *could* always do the unexpected and leverage web.xml's capability of
setting up exception handlers across the webapp, which can even be done for
HTTP errors. That might be really hard to work out though.


>From: John Ghidiu <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
>reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: Application-wide error page.
>Date: Wed, 14 Aug 2002 10:42:33 -0400
>
>I considered that, but again, that seems rather restrictive - if I want to
>change the error page in the future, I would have to change every JSP,
>right? And that does not solve the HTTP errors (404, for example).
>
>Regards,
>John
>
>John Ghidiu
>Benderson Development Company Inc.
>[EMAIL PROTECTED]
>(716) 878-9376
>
>
>-Original Message-
>From: Anoop Kumar V [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, August 14, 2002 10:38
>To: [EMAIL PROTECTED]
>Subject: Re: [JSP-INTEREST] Application-wide error page.
>
>
>u can use an error-page directive.
>In tomcat examples, there is a particular example which shows this.
>
>     <%@ page errorPage="errorpge.jsp" %>
>You will hv to include this in every jsp u wish to redirect to an error
>page
>like this.
>
>-anoop
>
>-Original Message-----
>From: John Ghidiu [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, August 14, 2002 7:44 PM
>To: [EMAIL PROTECTED]
>Subject: Application-wide error page.
>
>
>Hi All,
>
>I am writing my first web application, and I need some help. I have spent
>most of the morning looking for the answer to what should be a simple
>problem. I would like to have an error page that is global, in terms of the
>application. That is, whenever any type of error occurs, I would like some
>specific error page to be displayed. I have put
>java.lang.Throwable in the web.xml, but that does
>not work for http errors, such as 404. I realize that I could enumerate all
>the error codes within  sections, but that seems tedious and it
>just seems that there should be a better way. I am currently using Tomcat
>4.1.8, and I would like to keep the solution vendor independent. Any ideas?
>
>Regards,
>John
>
>John Ghidiu
>Benderson Development Company Inc.
>[EMAIL PROTECTED]
>(716) 878-9376
>
>==To
>unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com
>
>===
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com
>
>==To
>unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com


---
Joseph B. Ottinger   [EMAIL PROTECTED]
http://enigmastation.com  IT Consultant

_
Join the world's largest e-mail service with MSN Hotmail.
http://www.hotmail.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For dig

Re: Application-wide error page.

2002-08-14 Thread Joseph Ottinger

You *could* always do the unexpected and leverage web.xml's capability of
setting up exception handlers across the webapp, which can even be done for
HTTP errors. That might be really hard to work out though.


>From: John Ghidiu <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
>reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: Application-wide error page.
>Date: Wed, 14 Aug 2002 10:42:33 -0400
>
>I considered that, but again, that seems rather restrictive - if I want to
>change the error page in the future, I would have to change every JSP,
>right? And that does not solve the HTTP errors (404, for example).
>
>Regards,
>John
>
>John Ghidiu
>Benderson Development Company Inc.
>[EMAIL PROTECTED]
>(716) 878-9376
>
>
>-Original Message-
>From: Anoop Kumar V [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, August 14, 2002 10:38
>To: [EMAIL PROTECTED]
>Subject: Re: [JSP-INTEREST] Application-wide error page.
>
>
>u can use an error-page directive.
>In tomcat examples, there is a particular example which shows this.
>
>     <%@ page errorPage="errorpge.jsp" %>
>You will hv to include this in every jsp u wish to redirect to an error
>page
>like this.
>
>-anoop
>
>-Original Message-----
>From: John Ghidiu [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, August 14, 2002 7:44 PM
>To: [EMAIL PROTECTED]
>Subject: Application-wide error page.
>
>
>Hi All,
>
>I am writing my first web application, and I need some help. I have spent
>most of the morning looking for the answer to what should be a simple
>problem. I would like to have an error page that is global, in terms of the
>application. That is, whenever any type of error occurs, I would like some
>specific error page to be displayed. I have put
>java.lang.Throwable in the web.xml, but that does
>not work for http errors, such as 404. I realize that I could enumerate all
>the error codes within  sections, but that seems tedious and it
>just seems that there should be a better way. I am currently using Tomcat
>4.1.8, and I would like to keep the solution vendor independent. Any ideas?
>
>Regards,
>John
>
>John Ghidiu
>Benderson Development Company Inc.
>[EMAIL PROTECTED]
>(716) 878-9376
>
>==To
>unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com
>
>===
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com
>
>==To
>unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com


---
Joseph B. Ottinger   [EMAIL PROTECTED]
http://enigmastation.com  IT Consultant

_
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Application-wide error page.

2002-08-14 Thread John Ghidiu

I considered that, but again, that seems rather restrictive - if I want to change the 
error page in the future, I would have to change every JSP, right? And that does not 
solve the HTTP errors (404, for example).

Regards,
John

John Ghidiu
Benderson Development Company Inc.
[EMAIL PROTECTED]
(716) 878-9376


-Original Message-
From: Anoop Kumar V [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 14, 2002 10:38
To: [EMAIL PROTECTED]
Subject: Re: [JSP-INTEREST] Application-wide error page.


u can use an error-page directive.
In tomcat examples, there is a particular example which shows this.

<%@ page errorPage="errorpge.jsp" %>
You will hv to include this in every jsp u wish to redirect to an error page
like this.

-anoop

-Original Message-
From: John Ghidiu [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 14, 2002 7:44 PM
To: [EMAIL PROTECTED]
Subject: Application-wide error page.


Hi All,

I am writing my first web application, and I need some help. I have spent
most of the morning looking for the answer to what should be a simple
problem. I would like to have an error page that is global, in terms of the
application. That is, whenever any type of error occurs, I would like some
specific error page to be displayed. I have put
java.lang.Throwable in the web.xml, but that does
not work for http errors, such as 404. I realize that I could enumerate all
the error codes within  sections, but that seems tedious and it
just seems that there should be a better way. I am currently using Tomcat
4.1.8, and I would like to keep the solution vendor independent. Any ideas?

Regards,
John

John Ghidiu
Benderson Development Company Inc.
[EMAIL PROTECTED]
(716) 878-9376

==To
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

==To 
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Application-wide error page.

2002-08-14 Thread Anoop Kumar V

u can use an error-page directive.
In tomcat examples, there is a particular example which shows this.

<%@ page errorPage="errorpge.jsp" %>
You will hv to include this in every jsp u wish to redirect to an error page
like this.

-anoop

-Original Message-
From: John Ghidiu [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 14, 2002 7:44 PM
To: [EMAIL PROTECTED]
Subject: Application-wide error page.


Hi All,

I am writing my first web application, and I need some help. I have spent
most of the morning looking for the answer to what should be a simple
problem. I would like to have an error page that is global, in terms of the
application. That is, whenever any type of error occurs, I would like some
specific error page to be displayed. I have put
java.lang.Throwable in the web.xml, but that does
not work for http errors, such as 404. I realize that I could enumerate all
the error codes within  sections, but that seems tedious and it
just seems that there should be a better way. I am currently using Tomcat
4.1.8, and I would like to keep the solution vendor independent. Any ideas?

Regards,
John

John Ghidiu
Benderson Development Company Inc.
[EMAIL PROTECTED]
(716) 878-9376

==To
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Application-wide error page.

2002-08-14 Thread John Ghidiu

Hi All,

I am writing my first web application, and I need some help. I have spent most of the 
morning looking for the answer to what should be a simple problem. I would like to 
have an error page that is global, in terms of the application. That is, whenever any 
type of error occurs, I would like some specific error page to be displayed. I have 
put java.lang.Throwable in the web.xml, but that does not 
work for http errors, such as 404. I realize that I could enumerate all the error 
codes within  sections, but that seems tedious and it just seems that 
there should be a better way. I am currently using Tomcat 4.1.8, and I would like to 
keep the solution vendor independent. Any ideas?

Regards,
John

John Ghidiu
Benderson Development Company Inc.
[EMAIL PROTECTED]
(716) 878-9376

==To 
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: error-page vs. errorPage

2002-07-15 Thread Jay Burgess

Much thanks to Jayson and Hans for their replies.  It all makes sense now.

And when they're published, I'll be picking up copies of both of your new
books to say thanks. :) I'm looking forward to their release.

Jay

 > -Original Message-
 > From: Jayson Falkner [mailto:[EMAIL PROTECTED]]
 > Sent: Monday, July 15, 2002 8:30 AM
 > To: [EMAIL PROTECTED]
 > Subject: Re: error-page vs. errorPage
 >
 >
 > Hi Jay,
 >
 > I think this is an issue which was resolved with JSP 2.0. The
 > problem is
 > that an exception passed via web.xml uses the servlet spec, i.e. the
 > scoped variables set are :
 >
 > javax.servlet.error.status_code java.lang.Integer
 > javax.servlet.error.exception_type java.lang.Class
 > javax.servlet.error.message java.lang.String
 > javax.servlet.error.exception java.lang.Throwable
 > javax.servlet.error.request_uri java.lang.String
 > javax.servlet.error.servlet_name java.lang.String
 >
 > And the JSP 1.2 specs uses:
 >
 > javax.servlet.jsp.jspException
 >
 > So when you use web.xml for error handling (using JSP
 > 1.2/Servlets 2.3)
 > you get a NullPointerException because you are trying to access
 > "javax.servlet.jsp.jspException" (i.e. exception) when it
 > doesn't exist,
 > "javax.servlet.error.exception java.lang.Throwable" exists.
 >
 > To solve the problem now, try something like:
 >
 > <%
 >   if (exception == null) {
 > exception = (java.lang.Throwable)
 > request.getAttribute("javax.servlet.error.exception
 > java.lang.Throwable"); //remove line-wrap...
 >   }
 > %>
 >
 > And you should be set. FYI, JSP 2.0 should do this automatically for
 > you, however, officially check the spec ;)
 >
 > You should keep an eye on http://www.jspbook.com - Kevin Jones and I
 > have been working hard on a JSP 2.0 and Servlet 2.4 book which will be
 > out to compliment the upcoming specs. We cover this topic
 > along with the
 > million other JSP/Servlet things you should know about!
 >
 > Cheers,
 >
 > Jayson Falkner
 > [EMAIL PROTECTED]
 >
 >
 > Jay Burgess wrote:
 > > (I tried this question on the Tomcat list, and got no
 > response.  Maybe it's
 > > more of a JSP question? Thanks in advance.)
 > >
 > >> Can someone explain the relationship between the
 >  element in
 > >> my webapp's WEB.XML versus the "errorPage" attribute of the page
 > >> directive
 > >> within a JSP?  I'm trying to create a single error page
 > that handles any
 > >> exceptions generated by the JSPs within my webapp, without
 > having to name
 > >> the error page in every JSP.
 > >>
 > >> To start with, I added the following to my web app's WEB.XML to
 > >> indicate a
 > >> "catch all" error page for the app:
 > >>
 > >> 
 > >> java.lang.Exception
 > >> /error.jsp
 > >> 
 > >>
 > >> I also marked ERROR.JSP as an error page by including the
 > following at
 > >> the
 > >> top (note the isErrorPage attribute):
 > >>
 > >> <%@ page contentType="text/html; charset=ISO-8859-1"
 > buffer="64kb"
 > >> isErrorPage="true" %>
 > >>
 > >> Unfortunately, when trying to access the "exception"
 > object in ERROR.JSP,
 > >> I get a NullPointerException, as though it doesn't exist.
 > >>
 > >> Since I thought this should work, I must be missing
 > something?  (I'm
 > >> using
 > >> Tomcat 4.0.4, by the way.)
 > >>
 > >> Thanks.
 > >>
 > >> Jay
 > >
 > >
 > >
 > > -- Jay Burgess [[EMAIL PROTECTED]]
 > >Digital Archaeology Corporation
 > >(913) 438-9444 x154
 > >

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: error-page vs. errorPage

2002-07-15 Thread Hans Bergsten

Jay Burgess wrote:
> (I tried this question on the Tomcat list, and got no response.  Maybe it's
> more of a JSP question? Thanks in advance.)

Yes, this is related to the servlet and JSP specs, not a specific
implementation like Tomcat, see below.

>> Can someone explain the relationship between the  element in
>> my webapp's WEB.XML versus the "errorPage" attribute of the page
>> directive
>> within a JSP?  I'm trying to create a single error page that handles any
>> exceptions generated by the JSPs within my webapp, without having to name
>> the error page in every JSP.
>>
>> To start with, I added the following to my web app's WEB.XML to
>> indicate a
>> "catch all" error page for the app:
>>
>> 
>> java.lang.Exception
>> /error.jsp
>> 
>>
>> I also marked ERROR.JSP as an error page by including the following at
>> the
>> top (note the isErrorPage attribute):
>>
>> <%@ page contentType="text/html; charset=ISO-8859-1" buffer="64kb"
>> isErrorPage="true" %>
>>
>> Unfortunately, when trying to access the "exception" object in ERROR.JSP,
>> I get a NullPointerException, as though it doesn't exist.
>>
>> Since I thought this should work, I must be missing something?  (I'm
>> using
>> Tomcat 4.0.4, by the way.)

The "errorPage" attribute is defined by the JSP spec, of course, and
the  element in the web.xml file is defined by the servlet
spec. Both mechanism let you trap and process an exception, but the
the problem is that the servlet spec and the JSP spec use different
names for the request attribute used to pass on the exception to
the error page.

When you use "errorPage", the JSP spec says that the Throwable that
represents the exception must be sent as a request parameter named
"servlet.jsp.jspException". The implicit "exception" variable in the
error page is assigned the value of this request attribute.
The servletc spec says that a request attribute named "javax.servlet.
error.exception" must be used when an exception caught by 
is forwarded to an error page. Since this does not match the JSP spec
name, it's *not* assigned to the "exception" variable.

I describe a generic solution to this in detail in the upcoming 2nd
edition of my JSP book, but briefly, all you need to do is get hold
of the Throwable from the request attribute used by the servlet spec
instead. With scriptlets, it could look like this:

<%
   if (exception == null) {
 exception = request.getAttribute("javax.servlet.error.exception");
   }
%>

Hans
--
Hans Bergsten   [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
JavaServer Pageshttp://TheJSPBook.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: error-page vs. errorPage

2002-07-15 Thread Jayson Falkner

Hi Jay,

I think this is an issue which was resolved with JSP 2.0. The problem is
that an exception passed via web.xml uses the servlet spec, i.e. the
scoped variables set are :

javax.servlet.error.status_code java.lang.Integer
javax.servlet.error.exception_type java.lang.Class
javax.servlet.error.message java.lang.String
javax.servlet.error.exception java.lang.Throwable
javax.servlet.error.request_uri java.lang.String
javax.servlet.error.servlet_name java.lang.String

And the JSP 1.2 specs uses:

javax.servlet.jsp.jspException

So when you use web.xml for error handling (using JSP 1.2/Servlets 2.3)
you get a NullPointerException because you are trying to access
"javax.servlet.jsp.jspException" (i.e. exception) when it doesn't exist,
"javax.servlet.error.exception java.lang.Throwable" exists.

To solve the problem now, try something like:

<%
  if (exception == null) {
exception = (java.lang.Throwable)
request.getAttribute("javax.servlet.error.exception
java.lang.Throwable"); //remove line-wrap...
  }
%>

And you should be set. FYI, JSP 2.0 should do this automatically for
you, however, officially check the spec ;)

You should keep an eye on http://www.jspbook.com - Kevin Jones and I
have been working hard on a JSP 2.0 and Servlet 2.4 book which will be
out to compliment the upcoming specs. We cover this topic along with the
million other JSP/Servlet things you should know about!

Cheers,

Jayson Falkner
[EMAIL PROTECTED]


Jay Burgess wrote:
> (I tried this question on the Tomcat list, and got no response.  Maybe it's
> more of a JSP question? Thanks in advance.)
>
>> Can someone explain the relationship between the  element in
>> my webapp's WEB.XML versus the "errorPage" attribute of the page
>> directive
>> within a JSP?  I'm trying to create a single error page that handles any
>> exceptions generated by the JSPs within my webapp, without having to name
>> the error page in every JSP.
>>
>> To start with, I added the following to my web app's WEB.XML to
>> indicate a
>> "catch all" error page for the app:
>>
>> 
>> java.lang.Exception
>> /error.jsp
>> 
>>
>> I also marked ERROR.JSP as an error page by including the following at
>> the
>> top (note the isErrorPage attribute):
>>
>> <%@ page contentType="text/html; charset=ISO-8859-1" buffer="64kb"
>> isErrorPage="true" %>
>>
>> Unfortunately, when trying to access the "exception" object in ERROR.JSP,
>> I get a NullPointerException, as though it doesn't exist.
>>
>> Since I thought this should work, I must be missing something?  (I'm
>> using
>> Tomcat 4.0.4, by the way.)
>>
>> Thanks.
>>
>> Jay
>
>
>
> -- Jay Burgess [[EMAIL PROTECTED]]
>Digital Archaeology Corporation
>(913) 438-9444 x154
>
> ===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://archives.java.sun.com/jsp-interest.html
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.jsp
> http://www.jguru.com/faq/index.jsp
> http://www.jspinsider.com
>
>

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



error-page vs. errorPage

2002-07-15 Thread Jay Burgess

(I tried this question on the Tomcat list, and got no response.  Maybe it's
more of a JSP question? Thanks in advance.)

>Can someone explain the relationship between the  element in
>my webapp's WEB.XML versus the "errorPage" attribute of the page directive
>within a JSP?  I'm trying to create a single error page that handles any
>exceptions generated by the JSPs within my webapp, without having to name
>the error page in every JSP.
>
>To start with, I added the following to my web app's WEB.XML to indicate a
>"catch all" error page for the app:
>
> 
> java.lang.Exception
> /error.jsp
> 
>
>I also marked ERROR.JSP as an error page by including the following at the
>top (note the isErrorPage attribute):
>
> <%@ page contentType="text/html; charset=ISO-8859-1" buffer="64kb"
> isErrorPage="true" %>
>
>Unfortunately, when trying to access the "exception" object in ERROR.JSP,
>I get a NullPointerException, as though it doesn't exist.
>
>Since I thought this should work, I must be missing something?  (I'm using
>Tomcat 4.0.4, by the way.)
>
>Thanks.
>
>Jay


-- Jay Burgess [[EMAIL PROTECTED]]
Digital Archaeology Corporation
(913) 438-9444 x154

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Error page

2002-05-15 Thread Gading

At 11:02 AM 5/16/2002 +0530, you wrote:
>I think you need to specify the full virtual path of errorpage.jsp while
>defining the errorPage attribute in main.jsp

It's on the same directory, if so its hould give 404 instead of 500.
I thinks it because of "error scoping", for eaxample it work when i try to
getString("not_valid_colum"), but not other "serious" error.

Anyone knows the "scope"?

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Error page

2002-05-15 Thread Bhushan_Bhangale

I think you need to specify the full virtual path of errorpage.jsp while defining the 
errorPage attribute in main.jsp

-Original Message-
From: Gading [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 16, 2002 11:00 AM
To: [EMAIL PROTECTED]
Subject: Error page


Hi all,

I have 2 page one is main and one is for error page.

main.jsp

<%@ page errorPage="errorpage.jsp" %>


errorpage.jsp

<%@ page isErrorPage="true" %>


When there is error in main, it doesnt redirect to errorpage.js, but shows
internel server error (500).

I'm using Orion 1.54

Am i missing something?
Thanks.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

==To 
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Error page

2002-05-15 Thread Gading

Hi all,

I have 2 page one is main and one is for error page.

main.jsp

<%@ page errorPage="errorpage.jsp" %>


errorpage.jsp

<%@ page isErrorPage="true" %>


When there is error in main, it doesnt redirect to errorpage.js, but shows
internel server error (500).

I'm using Orion 1.54

Am i missing something?
Thanks.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Tomcat and error page display

2002-04-23 Thread Bommakanti, Vamsee

hello
I have an error page in my application that displays any/all the errors.
i have a problem here, when a page throws an error before it writes any
content to the output, it shows the error page ok,
but if there is any error after it writes the content to the page then it
doesnot show it at all.
In the second case it sometimes writes the entire error on to the browser or
sometimes it has a blank page loading.
When i check source for the blank page,it has the code for my errorpage with
all the error description but appended to the previous page which it was
loading.
Can somebody help me out.
Hope i am clear and did not confuse any one.
Thanks
Vamsee

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Configuring Default Error Page

2002-02-21 Thread Mahesh Kumar Punjabi

Hi All,
Could any body tell me how to configure the default error page in WebSphere 
Application Server Version 2.0.

Thanks
Mahesh

==To 
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Error page

2002-01-18 Thread Anthony Tagunov

Hello Yong,

Saturday, January 12, 2002, 8:53:27 AM, you wrote:

YCK> Hello there,

YCK> Putting the line below gave me the exception message
YCK> <%= exception.getMessage() %>

YCK> I want to get the printStackTrace of exceptions in JSP.

YCK> I read that there is a method for printStackTrace which
YCK> accepts an output object. I figure that implicit "out"
YCK> object in JSP for this.

YCK> However trying the line below gave me a JSP compilation error.

YCK> <%= exception.printStackTrace(out) %>

YCK> Any ideas on where I made a mistake.

You should have written

<% exception.printStackTrace(out) %>

(note that there's no '=' char there. use <%= when you return some
value from your expression and <% when you just want to do something.
I guess <%= exception.printStackTrace(out) %> gets translated into
something like

out.write( exception.printStackTrace(out) );

which wasn't your intention.

Depending on your servlet container you may find and may not the
generated .java code for your pages. Tomcat keeps them.
Weblogic deletes them.
If you can find the .java for your .jsp you'll probably
have more luck in catching errors like this.)

Good luck!
--
Best regards,
 Anton Tagunovmailto:[EMAIL PROTECTED]

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Error page

2002-01-12 Thread Dmitry Namiot

See Error tag from Coldtags suite:
http://www.servletsuite.com/jsp.htm

--
Hello there,

Putting the line below gave me the exception message
<%= exception.getMessage() %>

I want to get the printStackTrace of exceptions in JSP.

I read that there is a method for printStackTrace which
accepts an output object. I figure that implicit "out"
object in JSP for this.

However trying the line below gave me a JSP compilation error.

<%= exception.printStackTrace(out) %>

Any ideas on where I made a mistake.

Thank you.


--
Coldbeans Software - server-side Java (tm) components
http://www.servletsuite.com



__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Error page

2002-01-12 Thread Zvika Markfeld

try this:
<%
ByteArrayOutputStream baos = new ByteArrayOutputStream();
exception.printStackTrace(new PrintStream(baos));
out.println(baos.toString());
%>

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Yong Chee Keong
Sent: Saturday, January 12, 2002 7:53 AM
To: [EMAIL PROTECTED]
Subject: Error page


Hello there,

Putting the line below gave me the exception message
<%= exception.getMessage() %>

I want to get the printStackTrace of exceptions in JSP.

I read that there is a method for printStackTrace which
accepts an output object. I figure that implicit "out"
object in JSP for this.

However trying the line below gave me a JSP compilation error.

<%= exception.printStackTrace(out) %>

Any ideas on where I made a mistake.

Thank you.

Yong Chee Keong

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Error page

2002-01-11 Thread Hamid

Hi,
Use try from start 2 end of ur page
Catch the general exception and print its stact trace
e.g
tr{
...
..
}
catch (Exception exp)
{
<%= exp.getMessage() %>
}


Hamid Hassan

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]] On Behalf Of Yong Chee Keong
Sent: Saturday, January 12, 2002 10:53 AM
To: [EMAIL PROTECTED]
Subject: Error page

Hello there,

Putting the line below gave me the exception message
<%= exception.getMessage() %>

I want to get the printStackTrace of exceptions in JSP.

I read that there is a method for printStackTrace which
accepts an output object. I figure that implicit "out"
object in JSP for this.

However trying the line below gave me a JSP compilation error.

<%= exception.printStackTrace(out) %>

Any ideas on where I made a mistake.

Thank you.

Yong Chee Keong


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Error page

2002-01-11 Thread Yong Chee Keong

Hello there,

Putting the line below gave me the exception message
<%= exception.getMessage() %>

I want to get the printStackTrace of exceptions in JSP.

I read that there is a method for printStackTrace which
accepts an output object. I figure that implicit "out"
object in JSP for this.

However trying the line below gave me a JSP compilation error.

<%= exception.printStackTrace(out) %>

Any ideas on where I made a mistake.

Thank you.

Yong Chee Keong

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Error page in jsp

2001-11-15 Thread Joe Cheng

this technique worked fine for me on weblogic 5.  I can't show you any
examples though.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Error page in jsp

2001-11-13 Thread charu gupta

Hi,

I am developing an application consisting of jsp pages
and oracle d/b.
I have tried using the error page for trapping run
time errros, but its not working, the run time errors
still get displayed on the jsp page where they occur.

I'll have loked for examples on the internet but most
of the examples talk about using error pages in an
application using jsp's and servlets.

Could anybody please direct me to a good working
example of using an error page in a jsp application?

Thanks!

__
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



FW: jsp error page in email

2001-09-09 Thread BMS Robot Email

I used (*Chris*)'s solution of using the StringWriter below. Thank you.
and thanks to you Chris and Dmitry, I am sure your solutions would be
useful for others and for different situations.
with regards

Gamini de Alwis
mailto:[EMAIL PROTECTED]
Software Developer
Business Manager Software
Tel  (03) 9813 3022. Fax  (03) 9882 5887



-Original Message-
From: Chris Pratt [mailto:[EMAIL PROTECTED]]
Sent: Saturday, September 08, 2001 3:33 AM
To: [EMAIL PROTECTED]
Subject: Re: jsp error page in email


Try this:

java.io.StringWriter str = new java.io.StringWriter();
exception.printStackTrace(new java.io.PrintWriter(str));
return str.toString();

(*Chris*)

- Original Message -
From: "Christian Roslawski" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 07, 2001 5:17 AM
Subject: Re: [JSP-INTEREST] jsp error page in email


> Hi Gamini,
>
> > I have followed with interest Alireza & Richards problem and
solutions
> > for capturing stacktrace. I tried the solution suggested by you
first
> > using the following code within a JSP page
> >
> >   PipedWriter pipeOut = new PipedWriter();
> >   PipedReader pipeIn = new PipedReader(pipeOut);
> >   exception.printStackTrace(new PrintWriter(pipeOut));
> >   BufferedReader br = new BufferedReader(pipeIn);
> >   String inputStr;
> >   while((inputStr = br.readLine()) != null)
> >   ...and so on.
> > The program breaks down while attempting
> >   exception.printStackTrace(new PrintWriter(pipeOut));
> >
> > I wonder what I am doing wrong?
> > Any help would be much appreciated.
>
> Uhm, forget that, it was a silly idea from me to use both ends of a
pipe
> in the same thread, sorry. Lacking better ideas I suggest to use the
other
> suggested solution with a temporary file:
>
>   File tmpFile = File.createTempFile("exc", "tmp");
>
>   PrintWriter tmpOut = new PrintWriter(new FileWriter(tmpFile),
false);
>   exception.printStackTrace(tmpOut);
>   tmpOut.close();
>
>   BufferedReader tmpIn = new BufferedReader(new FileReader(tmpFile));
>   StringBuffer stackTrace = new StringBuffer();
>   String line;
>   while((line = tmpIn.readLine()) != null)
>   {
> stackTrace.append(line);
> stackTrace.append("\n");
>   }
>   tmpIn.close();
>
>   tmpFile.delete();
>
>   // send email with the stackTrace...
>
> This requires write access on the system's tmp dir, which you might
> have to add to the secutity policy if your jsp/servlet-container is
> using one. You can also choose a different directory, of course.
>
>   Chris
>
>

===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: jsp error page in email

2001-09-08 Thread Dmitry Namiot

see Error tag and Sendmail from Coldjava's
taglib: http://www.servletsuite.com/jsp.htm

You may use showError tag as a body for sendmail
--
Coldjava - server-side Java components
http://www.servletsuite.com



__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: jsp error page in email

2001-09-07 Thread Chris Pratt

Try this:

java.io.StringWriter str = new java.io.StringWriter();
exception.printStackTrace(new java.io.PrintWriter(str));
return str.toString();

(*Chris*)

- Original Message -
From: "Christian Roslawski" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 07, 2001 5:17 AM
Subject: Re: [JSP-INTEREST] jsp error page in email


> Hi Gamini,
>
> > I have followed with interest Alireza & Richards problem and solutions
> > for capturing stacktrace. I tried the solution suggested by you first
> > using the following code within a JSP page
> >
> >   PipedWriter pipeOut = new PipedWriter();
> >   PipedReader pipeIn = new PipedReader(pipeOut);
> >   exception.printStackTrace(new PrintWriter(pipeOut));
> >   BufferedReader br = new BufferedReader(pipeIn);
> >   String inputStr;
> >   while((inputStr = br.readLine()) != null)
> >   ...and so on.
> > The program breaks down while attempting
> >   exception.printStackTrace(new PrintWriter(pipeOut));
> >
> > I wonder what I am doing wrong?
> > Any help would be much appreciated.
>
> Uhm, forget that, it was a silly idea from me to use both ends of a pipe
> in the same thread, sorry. Lacking better ideas I suggest to use the other
> suggested solution with a temporary file:
>
>   File tmpFile = File.createTempFile("exc", "tmp");
>
>   PrintWriter tmpOut = new PrintWriter(new FileWriter(tmpFile), false);
>   exception.printStackTrace(tmpOut);
>   tmpOut.close();
>
>   BufferedReader tmpIn = new BufferedReader(new FileReader(tmpFile));
>   StringBuffer stackTrace = new StringBuffer();
>   String line;
>   while((line = tmpIn.readLine()) != null)
>   {
> stackTrace.append(line);
> stackTrace.append("\n");
>   }
>   tmpIn.close();
>
>   tmpFile.delete();
>
>   // send email with the stackTrace...
>
> This requires write access on the system's tmp dir, which you might
> have to add to the secutity policy if your jsp/servlet-container is
> using one. You can also choose a different directory, of course.
>
>   Chris
>
>
===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: jsp error page in email

2001-09-07 Thread Christian Roslawski

Hi Gamini,

> I have followed with interest Alireza & Richards problem and solutions
> for capturing stacktrace. I tried the solution suggested by you first
> using the following code within a JSP page
>
>   PipedWriter pipeOut = new PipedWriter();
>   PipedReader pipeIn = new PipedReader(pipeOut);
>   exception.printStackTrace(new PrintWriter(pipeOut));
>   BufferedReader br = new BufferedReader(pipeIn);
>   String inputStr;
>   while((inputStr = br.readLine()) != null)
>   ...and so on.
> The program breaks down while attempting
>   exception.printStackTrace(new PrintWriter(pipeOut));
>
> I wonder what I am doing wrong?
> Any help would be much appreciated.

Uhm, forget that, it was a silly idea from me to use both ends of a pipe
in the same thread, sorry. Lacking better ideas I suggest to use the other
suggested solution with a temporary file:

  File tmpFile = File.createTempFile("exc", "tmp");

  PrintWriter tmpOut = new PrintWriter(new FileWriter(tmpFile), false);
  exception.printStackTrace(tmpOut);
  tmpOut.close();

  BufferedReader tmpIn = new BufferedReader(new FileReader(tmpFile));
  StringBuffer stackTrace = new StringBuffer();
  String line;
  while((line = tmpIn.readLine()) != null)
  {
stackTrace.append(line);
stackTrace.append("\n");
  }
  tmpIn.close();

  tmpFile.delete();

  // send email with the stackTrace...

This requires write access on the system's tmp dir, which you might
have to add to the secutity policy if your jsp/servlet-container is
using one. You can also choose a different directory, of course.

  Chris

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



FW: RE: jsp error page in email

2001-09-06 Thread BMS Robot Email

> Hi Chris,
> I have followed with interest Alireza & Richards problem and solutions
> for capturing stacktrace. I tried the solution suggested by you first
> using the following code within a JSP page
>
>   PipedWriter pipeOut = new PipedWriter();
>   PipedReader pipeIn = new PipedReader(pipeOut);
>   exception.printStackTrace(new PrintWriter(pipeOut));
>   BufferedReader br = new BufferedReader(pipeIn);
>   String inputStr;
>   while((inputStr = br.readLine()) != null)
>   ...and so on.
> The program breaks down while attempting
>   exception.printStackTrace(new PrintWriter(pipeOut));
>
> I wonder what I am doing wrong?
> Any help would be much appreciated.
> with regards
>
> Gamini de Alwis
> mailto:[EMAIL PROTECTED]
> Software Developer
> Business Manager Software
> Tel  (03) 9813 3022. Fax  (03) 9882 5887
>
>
>
> -Original Message-
> From: Christian Roslawski [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 30, 2001 5:14 PM
> To: [EMAIL PROTECTED]
> Subject: Re: jsp error page in email
>
>
> Hi Alireza,
>
> > In my jsp error page I am sending en email to administrator
> mentioning
> the
> > error. Is there any way to send the trace stack to
> > this email?. exception.printStackTrace(...) show the stack on the
> screen
> > with void return value . Is there any other way to get this stack.
>
> You could use printStackTrace(PrintStream s) in conjunction with
> java.io.PipedInputStream and java.io.PipedOutputStream. Close the
> output stream before you start reading from the input stream.
>
>   Chris
>
> ==
> ==
> ===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
> Gamini de Alwis
> mailto:[EMAIL PROTECTED]
> Software Developer
> Business Manager Software
> Tel  (03) 9813 3022. Fax  (03) 9882 5887
>
>

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: jsp error page in email

2001-08-30 Thread Richard Yee

Alireza,
Nice idea. I haven't used errorPage much. I learned something new today.

Thanks,

Richard

At 05:19 PM 8/30/01 -0400, you wrote:
>Hi Richard,
>Your idea about using session variable leaded me to another solution. On top
>of each page I add <%@ page errorPage="error.jsp?jspfile=a.jsp" %> (b.jsp,
>c.jsp, ... ) then in error.jsp I read jspfile parameter and pass it to my
>email.
>
>Thank you.
>
>-Original Message-
>From: A mailing list about Java Server Pages specification and reference
>[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Yee
>Sent: Thursday, August 30, 2001 3:51 PM
>To: [EMAIL PROTECTED]
>Subject: Re: jsp error page in email
>
>
>Alireza,
>Why don't you put a string in the session that indicates the current JSP
>page.  The error page can then retrieve this value and display it in the
>email.  You would need to have code such as this
>session.setAttribute("lastPage",request.getRequestURI());
>at the beginning of every JSP page.
>
>-Richard
>
>At 03:44 PM 8/30/01 -0400, you wrote:
> >Hi Richard,
> >I have couple of jsp pages with page directive <%@ page
> >errorPage="error.jsp" %> so erro.jsp is my error page.
> >I do all exception handling in this page. I make the required email body in
> >this page and pass it to an email java method with the exception object.
> >
> >
> >--- A.jsp program ---
> >..
> ><%@ page errorPage="error.jsp" %>
> >..
> ><% try { %>
> >...
> >... ...
> >
> ><% } finally {
> >}
> >%>
> >--
> >
> > error.jsp --
> >...
> ><%@ page language="java" isErrorPage="true" %>
> >...
> ><% String errorMsg = "." +  "\nRequest URI : " +
> >request.getRequestURI();
> >
> >EmailTools.sendEmail ( ..., ..., errorMsg, excption );
> >---
> >
> >So, if any error happens in A.jsp then error.jsp will be invoked and I need
> >to pass A.jsp as part of errorMsg to email program. hope it's clear.
> >
> >Thank you.
> >
> >
> >-Original Message-
> >From: A mailing list about Java Server Pages specification and reference
> >[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Yee
> >Sent: Thursday, August 30, 2001 2:57 PM
> >To: [EMAIL PROTECTED]
> >Subject: Re: jsp error page in email
> >
> >
> >Alireza,
> >Is the email program a JSP page?  Can't you pass the return value of
> >getRequestURI() to the error JSP page the same way you are passing the
> >exception object?  Can you explain the flow of your web application so I
> >can understand the problem better?
> >
> >-Richard
> >
> >
> >
> >At 02:45 PM 8/30/01 -0400, you wrote:
> > >Hi Richard,
> > >In case of error I pass the exception object to email program, here after
> > >opening stream for the email body I could easily include the stack
>content
> > >using the method you mentioned.
> > >
> > >The getRequestURI() method returns the name of the jsp error page but I
> >need
> > >to get the name of the page which caused the error. Any comment
> >appreciated.
> > >
> > >Thank you,
> > >
> > >-Original Message-
> > >From: A mailing list about Java Server Pages specification and reference
> > >[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Yee
> > >Sent: Thursday, August 30, 2001 12:42 PM
> > >To: [EMAIL PROTECTED]
> > >Subject: Re: jsp error page in email
> > >
> > >
> > >Alireza,
> > >You can get it from the getRequestURI() method from the request object.
> > >
> > >By the way, what did you end up doing to get the stack trace as part of
>the
> > >email?  Can you include the code snippet?
> > >
> > >-Richard
> > >
> > >
> > >At 11:45 AM 8/30/01 -0400, you wrote:
> > > >Thank you Richard, it worked fine.
> > > >Is there any way to get the name of jsp file in which the error
>happened
> >in
> > > >an error page?
> > > >Thank you.
> > > >
> > > >-Original Message-
> > > >From: A mailing list about Java Server Pages specification and
>reference
> > > >[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Yee
> > > >Sent: Wednesday, August 29, 2001 4:31 PM
> > > >To: [EMAIL PROTECTED]
> > > >Subject: Re: jsp error page in emai

Re: jsp error page in email

2001-08-30 Thread Alireza Nahavandi

Hi Richard,
Your idea about using session variable leaded me to another solution. On top
of each page I add <%@ page errorPage="error.jsp?jspfile=a.jsp" %> (b.jsp,
c.jsp, ... ) then in error.jsp I read jspfile parameter and pass it to my
email.

Thank you.

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Yee
Sent: Thursday, August 30, 2001 3:51 PM
To: [EMAIL PROTECTED]
Subject: Re: jsp error page in email


Alireza,
Why don't you put a string in the session that indicates the current JSP
page.  The error page can then retrieve this value and display it in the
email.  You would need to have code such as this
session.setAttribute("lastPage",request.getRequestURI());
at the beginning of every JSP page.

-Richard

At 03:44 PM 8/30/01 -0400, you wrote:
>Hi Richard,
>I have couple of jsp pages with page directive <%@ page
>errorPage="error.jsp" %> so erro.jsp is my error page.
>I do all exception handling in this page. I make the required email body in
>this page and pass it to an email java method with the exception object.
>
>
>--- A.jsp program ---
>..
><%@ page errorPage="error.jsp" %>
>..
><% try { %>
>...
>... ...
>
><% } finally {
>}
>%>
>--
>
> error.jsp --
>...
><%@ page language="java" isErrorPage="true" %>
>...
><% String errorMsg = "." +  "\nRequest URI : " +
>request.getRequestURI();
>
>EmailTools.sendEmail ( ..., ..., errorMsg, excption );
>---
>
>So, if any error happens in A.jsp then error.jsp will be invoked and I need
>to pass A.jsp as part of errorMsg to email program. hope it's clear.
>
>Thank you.
>
>
>-Original Message-
>From: A mailing list about Java Server Pages specification and reference
>[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Yee
>Sent: Thursday, August 30, 2001 2:57 PM
>To: [EMAIL PROTECTED]
>Subject: Re: jsp error page in email
>
>
>Alireza,
>Is the email program a JSP page?  Can't you pass the return value of
>getRequestURI() to the error JSP page the same way you are passing the
>exception object?  Can you explain the flow of your web application so I
>can understand the problem better?
>
>-Richard
>
>
>
>At 02:45 PM 8/30/01 -0400, you wrote:
> >Hi Richard,
> >In case of error I pass the exception object to email program, here after
> >opening stream for the email body I could easily include the stack
content
> >using the method you mentioned.
> >
> >The getRequestURI() method returns the name of the jsp error page but I
>need
> >to get the name of the page which caused the error. Any comment
>appreciated.
> >
> >Thank you,
> >
> >-Original Message-
> >From: A mailing list about Java Server Pages specification and reference
> >[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Yee
> >Sent: Thursday, August 30, 2001 12:42 PM
> >To: [EMAIL PROTECTED]
> >Subject: Re: jsp error page in email
> >
> >
> >Alireza,
> >You can get it from the getRequestURI() method from the request object.
> >
> >By the way, what did you end up doing to get the stack trace as part of
the
> >email?  Can you include the code snippet?
> >
> >-Richard
> >
> >
> >At 11:45 AM 8/30/01 -0400, you wrote:
> > >Thank you Richard, it worked fine.
> > >Is there any way to get the name of jsp file in which the error
happened
>in
> > >an error page?
> > >Thank you.
> > >
> > >-Original Message-
> > >From: A mailing list about Java Server Pages specification and
reference
> > >[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Yee
> > >Sent: Wednesday, August 29, 2001 4:31 PM
> > >To: [EMAIL PROTECTED]
> > >Subject: Re: jsp error page in email
> > >
> > >
> > >Alireza,
> > >You can try outputting the stack trace to a temporary file using
> > >printStackTrace(PrintStream) and then attaching that file to your
> > >email.  You could also read the contents of the file back into the body
>of
> > >your email message.
> > >
> > >-Richard
> > >
> > >At 04:12 PM 8/29/01 -0400, you wrote:
> > > >Hi All,
> > > >In my jsp error page I am sending en email to administrator
mentioning
> >the
> > > >error. Is there any way to send the trace stack to
> > > >this email?. e

Re: jsp error page in email

2001-08-30 Thread Richard Yee

Alireza,
Why don't you put a string in the session that indicates the current JSP
page.  The error page can then retrieve this value and display it in the
email.  You would need to have code such as this
session.setAttribute("lastPage",request.getRequestURI());
at the beginning of every JSP page.

-Richard

At 03:44 PM 8/30/01 -0400, you wrote:
>Hi Richard,
>I have couple of jsp pages with page directive <%@ page
>errorPage="error.jsp" %> so erro.jsp is my error page.
>I do all exception handling in this page. I make the required email body in
>this page and pass it to an email java method with the exception object.
>
>
>--- A.jsp program ---
>..
><%@ page errorPage="error.jsp" %>
>..
><% try { %>
>...
>... ...
>
><% } finally {
>}
>%>
>--
>
> error.jsp --
>...
><%@ page language="java" isErrorPage="true" %>
>...
><% String errorMsg = "." +  "\nRequest URI : " +
>request.getRequestURI();
>
>EmailTools.sendEmail ( ..., ..., errorMsg, excption );
>---
>
>So, if any error happens in A.jsp then error.jsp will be invoked and I need
>to pass A.jsp as part of errorMsg to email program. hope it's clear.
>
>Thank you.
>
>
>-Original Message-
>From: A mailing list about Java Server Pages specification and reference
>[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Yee
>Sent: Thursday, August 30, 2001 2:57 PM
>To: [EMAIL PROTECTED]
>Subject: Re: jsp error page in email
>
>
>Alireza,
>Is the email program a JSP page?  Can't you pass the return value of
>getRequestURI() to the error JSP page the same way you are passing the
>exception object?  Can you explain the flow of your web application so I
>can understand the problem better?
>
>-Richard
>
>
>
>At 02:45 PM 8/30/01 -0400, you wrote:
> >Hi Richard,
> >In case of error I pass the exception object to email program, here after
> >opening stream for the email body I could easily include the stack content
> >using the method you mentioned.
> >
> >The getRequestURI() method returns the name of the jsp error page but I
>need
> >to get the name of the page which caused the error. Any comment
>appreciated.
> >
> >Thank you,
> >
> >-Original Message-
> >From: A mailing list about Java Server Pages specification and reference
> >[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Yee
> >Sent: Thursday, August 30, 2001 12:42 PM
> >To: [EMAIL PROTECTED]
> >Subject: Re: jsp error page in email
> >
> >
> >Alireza,
> >You can get it from the getRequestURI() method from the request object.
> >
> >By the way, what did you end up doing to get the stack trace as part of the
> >email?  Can you include the code snippet?
> >
> >-Richard
> >
> >
> >At 11:45 AM 8/30/01 -0400, you wrote:
> > >Thank you Richard, it worked fine.
> > >Is there any way to get the name of jsp file in which the error happened
>in
> > >an error page?
> > >Thank you.
> > >
> > >-Original Message-
> > >From: A mailing list about Java Server Pages specification and reference
> > >[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Yee
> > >Sent: Wednesday, August 29, 2001 4:31 PM
> > >To: [EMAIL PROTECTED]
> > >Subject: Re: jsp error page in email
> > >
> > >
> > >Alireza,
> > >You can try outputting the stack trace to a temporary file using
> > >printStackTrace(PrintStream) and then attaching that file to your
> > >email.  You could also read the contents of the file back into the body
>of
> > >your email message.
> > >
> > >-Richard
> > >
> > >At 04:12 PM 8/29/01 -0400, you wrote:
> > > >Hi All,
> > > >In my jsp error page I am sending en email to administrator mentioning
> >the
> > > >error. Is there any way to send the trace stack to
> > > >this email?. exception.printStackTrace(...) show the stack on the
>screen
> > > >with void return value . Is there any other way to get this stack.
> > > >
> > > >Thank you,
> > > >
> > >
> >
> >===
> > > >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > > >JSP-INTEREST".
> > > >For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> > >DIGES

Re: jsp error page in email

2001-08-30 Thread Alireza Nahavandi

Hi Richard,
I have couple of jsp pages with page directive <%@ page
errorPage="error.jsp" %> so erro.jsp is my error page.
I do all exception handling in this page. I make the required email body in
this page and pass it to an email java method with the exception object.


--- A.jsp program ---
..
<%@ page errorPage="error.jsp" %>
..
<% try { %>
...

...
...


<% } finally {
   }
%>
--

 error.jsp --
...
<%@ page language="java" isErrorPage="true" %>
...
<% String errorMsg = "." +  "\nRequest URI : " +
request.getRequestURI();

EmailTools.sendEmail ( ..., ..., errorMsg, excption );
---

So, if any error happens in A.jsp then error.jsp will be invoked and I need
to pass A.jsp as part of errorMsg to email program. hope it's clear.

Thank you.


-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Yee
Sent: Thursday, August 30, 2001 2:57 PM
To: [EMAIL PROTECTED]
Subject: Re: jsp error page in email


Alireza,
Is the email program a JSP page?  Can't you pass the return value of
getRequestURI() to the error JSP page the same way you are passing the
exception object?  Can you explain the flow of your web application so I
can understand the problem better?

-Richard



At 02:45 PM 8/30/01 -0400, you wrote:
>Hi Richard,
>In case of error I pass the exception object to email program, here after
>opening stream for the email body I could easily include the stack content
>using the method you mentioned.
>
>The getRequestURI() method returns the name of the jsp error page but I
need
>to get the name of the page which caused the error. Any comment
appreciated.
>
>Thank you,
>
>-Original Message-
>From: A mailing list about Java Server Pages specification and reference
>[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Yee
>Sent: Thursday, August 30, 2001 12:42 PM
>To: [EMAIL PROTECTED]
>Subject: Re: jsp error page in email
>
>
>Alireza,
>You can get it from the getRequestURI() method from the request object.
>
>By the way, what did you end up doing to get the stack trace as part of the
>email?  Can you include the code snippet?
>
>-Richard
>
>
>At 11:45 AM 8/30/01 -0400, you wrote:
> >Thank you Richard, it worked fine.
> >Is there any way to get the name of jsp file in which the error happened
in
> >an error page?
> >Thank you.
> >
> >-Original Message-----
> >From: A mailing list about Java Server Pages specification and reference
> >[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Yee
> >Sent: Wednesday, August 29, 2001 4:31 PM
> >To: [EMAIL PROTECTED]
> >Subject: Re: jsp error page in email
> >
> >
> >Alireza,
> >You can try outputting the stack trace to a temporary file using
> >printStackTrace(PrintStream) and then attaching that file to your
> >email.  You could also read the contents of the file back into the body
of
> >your email message.
> >
> >-Richard
> >
> >At 04:12 PM 8/29/01 -0400, you wrote:
> > >Hi All,
> > >In my jsp error page I am sending en email to administrator mentioning
>the
> > >error. Is there any way to send the trace stack to
> > >this email?. exception.printStackTrace(...) show the stack on the
screen
> > >with void return value . Is there any other way to get this stack.
> > >
> > >Thank you,
> > >
> >
>
>===
> > >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > >JSP-INTEREST".
> > >For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> >DIGEST".
> > >Some relevant FAQs on JSP/Servlets can be found at:
> > >
> > >  http://java.sun.com/products/jsp/faq.html
> > >  http://www.esperanto.org.nz/jsp/jspfaq.html
> > >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
>
>===
> >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> >JSP-INTEREST".
> >For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> >DIGEST".
> >Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> &g

Re: jsp error page in email

2001-08-30 Thread Richard Yee

Alireza,
Is the email program a JSP page?  Can't you pass the return value of
getRequestURI() to the error JSP page the same way you are passing the
exception object?  Can you explain the flow of your web application so I
can understand the problem better?

-Richard



At 02:45 PM 8/30/01 -0400, you wrote:
>Hi Richard,
>In case of error I pass the exception object to email program, here after
>opening stream for the email body I could easily include the stack content
>using the method you mentioned.
>
>The getRequestURI() method returns the name of the jsp error page but I need
>to get the name of the page which caused the error. Any comment appreciated.
>
>Thank you,
>
>-Original Message-
>From: A mailing list about Java Server Pages specification and reference
>[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Yee
>Sent: Thursday, August 30, 2001 12:42 PM
>To: [EMAIL PROTECTED]
>Subject: Re: jsp error page in email
>
>
>Alireza,
>You can get it from the getRequestURI() method from the request object.
>
>By the way, what did you end up doing to get the stack trace as part of the
>email?  Can you include the code snippet?
>
>-Richard
>
>
>At 11:45 AM 8/30/01 -0400, you wrote:
> >Thank you Richard, it worked fine.
> >Is there any way to get the name of jsp file in which the error happened in
> >an error page?
> >Thank you.
> >
> >-Original Message-
> >From: A mailing list about Java Server Pages specification and reference
> >[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Yee
> >Sent: Wednesday, August 29, 2001 4:31 PM
> >To: [EMAIL PROTECTED]
> >Subject: Re: jsp error page in email
> >
> >
> >Alireza,
> >You can try outputting the stack trace to a temporary file using
> >printStackTrace(PrintStream) and then attaching that file to your
> >email.  You could also read the contents of the file back into the body of
> >your email message.
> >
> >-Richard
> >
> >At 04:12 PM 8/29/01 -0400, you wrote:
> > >Hi All,
> > >In my jsp error page I am sending en email to administrator mentioning
>the
> > >error. Is there any way to send the trace stack to
> > >this email?. exception.printStackTrace(...) show the stack on the screen
> > >with void return value . Is there any other way to get this stack.
> > >
> > >Thank you,
> > >
> >
> >===
> > >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > >JSP-INTEREST".
> > >For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> >DIGEST".
> > >Some relevant FAQs on JSP/Servlets can be found at:
> > >
> > >  http://java.sun.com/products/jsp/faq.html
> > >  http://www.esperanto.org.nz/jsp/jspfaq.html
> > >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
> >===
> >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> >JSP-INTEREST".
> >For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> >DIGEST".
> >Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
> >===
> >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> >JSP-INTEREST".
> >For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
> >Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>===
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Re: jsp error page in email

2001-08-30 Thread Alireza Nahavandi

Hi Richard,
In case of error I pass the exception object to email program, here after
opening stream for the email body I could easily include the stack content
using the method you mentioned.

The getRequestURI() method returns the name of the jsp error page but I need
to get the name of the page which caused the error. Any comment appreciated.

Thank you,

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Yee
Sent: Thursday, August 30, 2001 12:42 PM
To: [EMAIL PROTECTED]
Subject: Re: jsp error page in email


Alireza,
You can get it from the getRequestURI() method from the request object.

By the way, what did you end up doing to get the stack trace as part of the
email?  Can you include the code snippet?

-Richard


At 11:45 AM 8/30/01 -0400, you wrote:
>Thank you Richard, it worked fine.
>Is there any way to get the name of jsp file in which the error happened in
>an error page?
>Thank you.
>
>-Original Message-
>From: A mailing list about Java Server Pages specification and reference
>[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Yee
>Sent: Wednesday, August 29, 2001 4:31 PM
>To: [EMAIL PROTECTED]
>Subject: Re: jsp error page in email
>
>
>Alireza,
>You can try outputting the stack trace to a temporary file using
>printStackTrace(PrintStream) and then attaching that file to your
>email.  You could also read the contents of the file back into the body of
>your email message.
>
>-Richard
>
>At 04:12 PM 8/29/01 -0400, you wrote:
> >Hi All,
> >In my jsp error page I am sending en email to administrator mentioning
the
> >error. Is there any way to send the trace stack to
> >this email?. exception.printStackTrace(...) show the stack on the screen
> >with void return value . Is there any other way to get this stack.
> >
> >Thank you,
> >
>
>===
> >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> >JSP-INTEREST".
> >For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
> >Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>===
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>===
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: jsp error page in email

2001-08-30 Thread Richard Yee

Alireza,
You can get it from the getRequestURI() method from the request object.

By the way, what did you end up doing to get the stack trace as part of the
email?  Can you include the code snippet?

-Richard


At 11:45 AM 8/30/01 -0400, you wrote:
>Thank you Richard, it worked fine.
>Is there any way to get the name of jsp file in which the error happened in
>an error page?
>Thank you.
>
>-Original Message-
>From: A mailing list about Java Server Pages specification and reference
>[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Yee
>Sent: Wednesday, August 29, 2001 4:31 PM
>To: [EMAIL PROTECTED]
>Subject: Re: jsp error page in email
>
>
>Alireza,
>You can try outputting the stack trace to a temporary file using
>printStackTrace(PrintStream) and then attaching that file to your
>email.  You could also read the contents of the file back into the body of
>your email message.
>
>-Richard
>
>At 04:12 PM 8/29/01 -0400, you wrote:
> >Hi All,
> >In my jsp error page I am sending en email to administrator mentioning the
> >error. Is there any way to send the trace stack to
> >this email?. exception.printStackTrace(...) show the stack on the screen
> >with void return value . Is there any other way to get this stack.
> >
> >Thank you,
> >
> >===
> >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> >JSP-INTEREST".
> >For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
> >Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>===
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>===
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: jsp error page in email

2001-08-30 Thread Alireza Nahavandi

Thank you Richard, it worked fine.
Is there any way to get the name of jsp file in which the error happened in
an error page?
Thank you.

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Yee
Sent: Wednesday, August 29, 2001 4:31 PM
To: [EMAIL PROTECTED]
Subject: Re: jsp error page in email


Alireza,
You can try outputting the stack trace to a temporary file using
printStackTrace(PrintStream) and then attaching that file to your
email.  You could also read the contents of the file back into the body of
your email message.

-Richard

At 04:12 PM 8/29/01 -0400, you wrote:
>Hi All,
>In my jsp error page I am sending en email to administrator mentioning the
>error. Is there any way to send the trace stack to
>this email?. exception.printStackTrace(...) show the stack on the screen
>with void return value . Is there any other way to get this stack.
>
>Thank you,
>
>===
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: jsp error page in email

2001-08-29 Thread Christian Roslawski

Hi Alireza,

> In my jsp error page I am sending en email to administrator mentioning the
> error. Is there any way to send the trace stack to
> this email?. exception.printStackTrace(...) show the stack on the screen
> with void return value . Is there any other way to get this stack.

You could use printStackTrace(PrintStream s) in conjunction with
java.io.PipedInputStream and java.io.PipedOutputStream. Close the
output stream before you start reading from the input stream.

  Chris

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: jsp error page in email

2001-08-29 Thread Richard Yee

Alireza,
You can try outputting the stack trace to a temporary file using
printStackTrace(PrintStream) and then attaching that file to your
email.  You could also read the contents of the file back into the body of
your email message.

-Richard

At 04:12 PM 8/29/01 -0400, you wrote:
>Hi All,
>In my jsp error page I am sending en email to administrator mentioning the
>error. Is there any way to send the trace stack to
>this email?. exception.printStackTrace(...) show the stack on the screen
>with void return value . Is there any other way to get this stack.
>
>Thank you,
>
>===
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



jsp error page in email

2001-08-29 Thread Alireza Nahavandi

Hi All,
In my jsp error page I am sending en email to administrator mentioning the
error. Is there any way to send the trace stack to
this email?. exception.printStackTrace(...) show the stack on the screen
with void return value . Is there any other way to get this stack.

Thank you,

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



I need a 404 error page redirect

2001-05-23 Thread Doug Cannon

Hey list, how's it going?

I must be missing something.  I am trying to redirect to a custom error
page whenever a 404 error occurs.  It ought to be easy, but I'm having
trouble.

I am using Apache and Tomcat on Linux for my JSP pages.  I don't know
all the version numbers, but I can get them if anyone needs to know.

I have edited the httpd.conf file, and used the ErrorDocument directive
as explained here:
http://httpd.apache.org/docs/mod/core.html#errordocument

I am able to get the redirection to occur if I use the full URL (i.e.
http://www.bogusdomain.com/error404.jsp) but I don't want to do that.
When it redirects, it is telling the client to request my error page,
and so the original URL they were trying to go to is lost to me, and
any querystring data as well.

So, I would like to use option (3) (on the web link shown above) and
that is to redirect to a local URL to handle the error.  I am hoping
that if I do that, then I can retain the original URL and querystring
information that the user has requested, and then I can handle it in my
custom error page.

I'm sure people have done this, and I don't know why I can't get it to
work.  Does anyone have any suggestions?  I greatly appreciate it.

A couple detailed questions about this:  When I use the ErrorDocument
directive to redirect to an external URL, I give it the full URL.  From
what I understand, if I want to redirect to a local URL, then I can
just give it a relative path, right?  For example, if my Error page is
http://www.bogusdomain.com/error404.jsp, then I should just be able to
use this line in the httpd.conf file, right:

ErrorDocument 404 error404.jsp

If so, then does anyone know why that doesn't work?  If not, then what
do I need to do?  Thanks!

Doug Cannon
Dentrix Dental Systems
http://www.dentrix.com


__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: ERROR page ...

2001-05-18 Thread Yee, Hung

Here's an example from Sun's JSP tutorial that you might be interested in:
http://www.java.sun.com/products/jsp/html/jsptut11a.html


-Original Message-
From: BERWART Thierry [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 18, 2001 1:40 AM
To: [EMAIL PROTECTED]
Subject: ERROR page ...


Hello,

I want to create a beautiful error page for my application but
I have no idea about the design ...
and this is why I ask you whether you would have any examples of error
page...

Thanks

Thierry

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
This email message is for the sole use of the intended recipient(s) and may
contain proprietary and confidential information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message. Thank you

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: ERROR page ...

2001-05-18 Thread Diego Jiménez Romero

Hello berwart.
Here you have an Error Page example:
You can extends, exception class and in the jsp's when an error ocurred you
can throw a exception controlled or if the exception is outside.
In the errorPage, you can know the exception that produced the jsp (if was a
myException or an Exception).


<%@page language="java" isErrorPage="true"
import="java.sql.*,java.awt.*,java.io.*,
javax.servlet.*,javax.servlet.http.*" %>









<%
if(exception instanceof myException){
String m = ((myException) exception).getMensaje();
%>

<!--
alert("Error : " + "<%=m%>");
document.salir.submit();
//-->

<%
}
else{
%>

<!--
alert("ERROR ADVERTISEMENT: <%=exception%>");
document.salir.submit();
//-->

<%
}
%>



> -Mensaje original-
> De: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]En nombre de BERWART Thierry
> Enviado el: viernes 18 de mayo de 2001 10:40
> Para: [EMAIL PROTECTED]
> Asunto: ERROR page ...
>
>
> Hello,
>
> I want to create a beautiful error page for my application but
> I have no idea about the design ...
> and this is why I ask you whether you would have any examples of error
> page...
>
> Thanks
>
> Thierry
>
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



ERROR page ...

2001-05-18 Thread BERWART Thierry

Hello,

I want to create a beautiful error page for my application but
I have no idea about the design ...
and this is why I ask you whether you would have any examples of error
page...

Thanks

Thierry

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Error page to be displayed on a separate window

2001-04-25 Thread Sagar Pandit

Use the errorPage Attribute in the page used as the form like this:

<%@ page errorPage="Relative URL" %>

and use the isErrorPage Attribute in the page that u want errors to be
displayed like this:

<%@ isErrorPage="true" %>
In this errorPage, u can use the "exception" variable to print the errors as
u do normally.

Sagar


-Original Message-
From: Nabe Anju [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 9:49 AM
To: [EMAIL PROTECTED]
Subject: Error page to be displayed on a separate window


Hi,

I am using JSP -servlet-bean technology for my application. The requirement
is that when a servlet is invoked from a FORM with a target window, then
the data returned back from the servlet should be displayed onto that ; but
in the case of error, the error msg should be displayed on a separate
window.

Basically, if the user is trying to update some data (in a form) then the
error page should be shown in a separate window giving him an option to
correct the mistakes rather than overlaying the data window .

Is there a way to do it? Pls help.

Thanks.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Error page to be displayed on a separate window

2001-04-25 Thread Nabe Anju

Hi,

I am using JSP -servlet-bean technology for my application. The requirement
is that when a servlet is invoked from a FORM with a target window, then
the data returned back from the servlet should be displayed onto that ; but
in the case of error, the error msg should be displayed on a separate
window.

Basically, if the user is trying to update some data (in a form) then the
error page should be shown in a separate window giving him an option to
correct the mistakes rather than overlaying the data window .

Is there a way to do it? Pls help.

Thanks.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: JSWDK-1.0.1 error page

2001-03-26 Thread Alison Dent

In the catch clause of the try-catch

exception.printStackTrace(out);

A. Dent



Daniel Tomé wrote:
>
> Hi,
> I wanted to know if there's anyway that I can display the errors on the web
> browser instead of the cmd console.
> Thanks.
>
> Daniel Tome
> [EMAIL PROTECTED]
>
> ===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



JSWDK-1.0.1 error page

2001-03-26 Thread Daniel Tomé

Hi,
I wanted to know if there's anyway that I can display the errors on the web
browser instead of the cmd console.
Thanks.

Daniel Tome
[EMAIL PROTECTED]

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



error page

2001-03-13 Thread dion

Hello all,

  1. i have a jsp file which include A.jsp then B.jsp, each has
 errorpage.jsp as its error page. however when i set condition so
 A.jsp & B.jsp will fail, errorpage only display error from A. Is
 there any way to display both of them?

  2. I'm trying to get the page who trigger errorpage.jsp, i tried
 using:
 this error caused by:
 <%= javax.servlet.http.HttpUtils.getRequestURL(request) %>

 but instead of displaying
 this error caused by: A.jsp

 it always displays
 this error caused by: http://localhost/makeerror/errorpage.jsp
 (i.e. the jsp errorpage itself).

 how to make it works? pleas help..

  thanks for any suggestion..





--
Best regards,
 dion  mailto:[EMAIL PROTECTED]

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Error page

2001-02-21 Thread Clemente Dani

I suppose, you can use simple try/catch  and forward to a error page
yourself (if you didn't sent any data before).

Bye

- Mensaje Original -
De: Tushar Sarmah <[EMAIL PROTECTED]>
Fecha: Miércoles, Febrero 21, 2001 12:54 pm
Asunto: Error page

> We are using Web sphere 2.0.3 which uses JSP .9. It does not
> support the
> error page directive. Is there any other way to do it?
>
> Tushar
>
>

===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-
> INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>



Consigue tu cuenta gratuita de acceso a internet y de correo en
http://www.navegalia.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Error page

2001-02-21 Thread Tushar Sarmah

We are using Web sphere 2.0.3 which uses JSP .9. It does not support the
error page directive. Is there any other way to do it?

Tushar

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Error Page.

2000-12-23 Thread Abhay Chaware

Hi !
 I am new to JSP. I had a doubt. How can you get control back to JSP page after 
transferring the focus to Error Page ?

What i want to ask is, if some exception occures, and the error page is given the 
control to. Now how can I go back to original JSP page ?

Abhay


Chequemail.com - a free web based e-mail service that also pays!!!
http://www.chequemail.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



ANSWER to JSP Error Page with a servlet

2000-08-09 Thread Patrick Buchanan

Thanks for all the responses especially Todd whose advice worked.

I created a goToPage() method which forwards to any JSP page which you provide
with the URL parameter.  In this instance, I am calling the JSP I set up for
error pages.

//call the jsp
 String errorURL = "/app_jsp/OIRCerror.jsp";
 req.setAttribute("exception", e);
 try{
 goToPage(req,rsp, errorURL);
}catch (ServletException se)
{
 do something
 }catch (IOException ioe)
 {
 do something
}

here's the method

private void goToPage(HttpServletRequest req, HttpServletResponse rsp, String
URL)
throws ServletException, IOException
{
RequestDispatcher dispatcher =
getServletContext().getRequestDispatcher(URL);
dispatcher.forward(req, rsp);
}

My error jsp has the following:

<%
// If the exception comes from a servlet then the Error JSP's implicit exception
 is null and the exception thrown by the servlet
// will be found inside the request object which was put there by the code above

//Else the exception was thrown by a JSP and the implicit exception object
// is not null and then the page will execute
if((Exception)request.getAttribute("exception") != null)
{
 exception = (Exception)request.getAttribute("exception");
}
%>
   <%= exception%>


   <%
String result = makeErrorReport(request, exception);
out.println(result);
   %>


If the exception comes
makeErrorReport() is a function embedded in the JSP to print out the stacktrace,
 header info, request info, etc.





TODD HARNEY <[EMAIL PROTECTED]> on 08/09/2000 09:38:33 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Patrick Buchanan/CFC)

Subject:  Re: JSP Error Page with a servlet




You are exactly right...from your servlet you forward to the JSP error
page...storing the exception as an attribute...which your JSP error page can
pull out of the request object it receives and then display that error.

>>> [EMAIL PROTECTED] 8/9/00 9:10 >>>
I sent this out yesterday without a single reply.  Can anyone help me on this?
I'm new at Java so any advice would be appreciated.

How do I use a JSP Error Page with a servlet?   I assume I use a
RequestDispatcher object to forward the request and response objects to the JSP,
but does anyone have a code example of how to accomplish this?  Do I have to
store it as a request attribute and then have code in the JSP to pull it out and
print it to the screen?  What is the easiest way here?

I want to use the same JSP error page for both my controller servlet and the
associated JSP's.

pat









"This may contain information that is confidential or privileged. If you are not
the addressee indicated in this message (or responsible for delivery of this
message to such person), you should not  copy or deliver this message to
anyone or make any other use of the information set forth herein.  In such
case, you should destroy this  message and notify the sender by telephone
or e-mail."

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets














"This may contain information that is confidential or privileged. If you are not
the addressee indicated in this message (or responsible for delivery of this
message to such person), you should not  copy or deliver this message to
anyone or make any other use of the information set forth herein.  In such
case, you should destroy this  message and notify the sender by telephone
or e-mail."

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: JSP Error Page with a servlet

2000-08-09 Thread Hans Bergsten

Patrick Buchanan wrote:
>
> I sent this out yesterday without a single reply.  Can anyone help me on this?
> I'm new at Java so any advice would be appreciated.
>
> How do I use a JSP Error Page with a servlet?   I assume I use a
> RequestDispatcher object to forward the request and response objects to the JSP,
> but does anyone have a code example of how to accomplish this?  Do I have to
> store it as a request attribute and then have code in the JSP to pull it out and
> print it to the screen?  What is the easiest way here?
>
> I want to use the same JSP error page for both my controller servlet and the
> associated JSP's.

You can do something like this:

public void doPost(HttpServletRequest request,
HttpServletResponse response) {

...
try {
action.perform(this, request, response);
}
catch (Throwable t) {
request.setAttribute("javax.servlet.jsp.jspException", t);

RequestDispatcher rd =
getServletContext().getRequestDispatcher("/error.jsp");
rd.forward(request, response);
}
}

If /error.jsp is a JSP page with <%@ page isErrorPage="true" %>, the JSP
container assigns the value of the "javax.servlet.jsp.jspException"
attribute to the implicit "exception" variable. Your JSP page can then
use this object the same way as if it's invoked due to an exception
in a JSP page.

Hans
--
Hans Bergsten   [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: JSP Error Page with a servlet

2000-08-09 Thread Naresh Thawani

write error.jsp.
catch exception e and display error.jsp if error else xyz.jsp

-Original Message-
From: Rogério Saran [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 09, 2000 8:29 AM
To: [EMAIL PROTECTED]
Subject: Re: JSP Error Page with a servlet


Patrick, maybe you will not need to "code" the error handling. Some
servlet containers can handle servlet errors loading a standard page.
Take a look at Resin (www.caucho.com).


Patrick Buchanan wrote:
>
> I sent this out yesterday without a single reply.  Can anyone help me on
this?
> I'm new at Java so any advice would be appreciated.
>
> How do I use a JSP Error Page with a servlet?   I assume I use a
> RequestDispatcher object to forward the request and response objects to
the JSP,
> but does anyone have a code example of how to accomplish this?  Do I have
to
> store it as a request attribute and then have code in the JSP to pull it
out and
> print it to the screen?  What is the easiest way here?
>
> I want to use the same JSP error page for both my controller servlet and
the
> associated JSP's.
>
> pat
>

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: JSP Error Page with a servlet

2000-08-09 Thread Rema Kumar

Pat,

Do something like this on the JSP side:

<%@ page import="java.util.*" %>
<%@ page import="javax.servlet.http.*" %>



private String getSearchResults( HttpServletRequest  request,
 HttpServletResponse response,
 String  passedQueryString,
 String  targetURL )
throws java.io.IOException
{
StringBuffer retBuffer = new StringBuffer();
try{

retBuffer.append(
GeneralPubXSearchEngine.getEngineResults( request,
  response,
  passedQueryString,
  targetURL )
);
}catch( Exception error ){
ErrorHandler.log("In JSP page generalsearchresults.jsp:",
error);
response.sendRedirect("/error/server_error.html");(Important
define your error page)
}
    return retBuffer.toString();
}


Have a error page defined on the server and the same html page can be used
for displaying servlet errors as well as errors on a JSP page.


Servlet side code sample


 public static String getEngineResults( HttpServletRequest req,
   HttpServletResponse res,
   String passedQueryString,
   String targetURL)
throws ServletException, IOException

try { BLOCK !

} catch (Exception e) {
ErrorHandler.log("In JSP page genpubxsearchres.jsp:", e);
res.sendRedirect("/error/server_error.html");
}

return outBuffer.toString();
}
Hope this helps.
-Original Message-
From: Patrick Buchanan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 09, 2000 9:11 AM
To: [EMAIL PROTECTED]
Subject: JSP Error Page with a servlet


I sent this out yesterday without a single reply.  Can anyone help me on
this?
I'm new at Java so any advice would be appreciated.

How do I use a JSP Error Page with a servlet?   I assume I use a
RequestDispatcher object to forward the request and response objects to the
JSP,
but does anyone have a code example of how to accomplish this?  Do I have to
store it as a request attribute and then have code in the JSP to pull it out
and
print it to the screen?  What is the easiest way here?

I want to use the same JSP error page for both my controller servlet and the
associated JSP's.

pat









"This may contain information that is confidential or privileged. If you are
not
the addressee indicated in this message (or responsible for delivery of this
message to such person), you should not  copy or deliver this message to
anyone or make any other use of the information set forth herein.  In such
case, you should destroy this  message and notify the sender by telephone
or e-mail."

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: JSP Error Page with a servlet

2000-08-09 Thread TODD HARNEY

You are exactly right...from your servlet you forward to the JSP error page...storing 
the exception as an attribute...which your JSP error page can pull out of the request 
object it receives and then display that error.

>>> [EMAIL PROTECTED] 8/9/00 9:10 >>>
I sent this out yesterday without a single reply.  Can anyone help me on this?
I'm new at Java so any advice would be appreciated.

How do I use a JSP Error Page with a servlet?   I assume I use a
RequestDispatcher object to forward the request and response objects to the JSP,
but does anyone have a code example of how to accomplish this?  Do I have to
store it as a request attribute and then have code in the JSP to pull it out and
print it to the screen?  What is the easiest way here?

I want to use the same JSP error page for both my controller servlet and the
associated JSP's.

pat









"This may contain information that is confidential or privileged. If you are not
the addressee indicated in this message (or responsible for delivery of this
message to such person), you should not  copy or deliver this message to
anyone or make any other use of the information set forth herein.  In such
case, you should destroy this  message and notify the sender by telephone
or e-mail."

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: JSP Error Page with a servlet

2000-08-09 Thread Rogério Saran

Patrick, maybe you will not need to "code" the error handling. Some
servlet containers can handle servlet errors loading a standard page.
Take a look at Resin (www.caucho.com).


Patrick Buchanan wrote:
>
> I sent this out yesterday without a single reply.  Can anyone help me on this?
> I'm new at Java so any advice would be appreciated.
>
> How do I use a JSP Error Page with a servlet?   I assume I use a
> RequestDispatcher object to forward the request and response objects to the JSP,
> but does anyone have a code example of how to accomplish this?  Do I have to
> store it as a request attribute and then have code in the JSP to pull it out and
> print it to the screen?  What is the easiest way here?
>
> I want to use the same JSP error page for both my controller servlet and the
> associated JSP's.
>
> pat
>

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



JSP Error Page with a servlet

2000-08-09 Thread Patrick Buchanan

I sent this out yesterday without a single reply.  Can anyone help me on this?
I'm new at Java so any advice would be appreciated.

How do I use a JSP Error Page with a servlet?   I assume I use a
RequestDispatcher object to forward the request and response objects to the JSP,
but does anyone have a code example of how to accomplish this?  Do I have to
store it as a request attribute and then have code in the JSP to pull it out and
print it to the screen?  What is the easiest way here?

I want to use the same JSP error page for both my controller servlet and the
associated JSP's.

pat









"This may contain information that is confidential or privileged. If you are not
the addressee indicated in this message (or responsible for delivery of this
message to such person), you should not  copy or deliver this message to
anyone or make any other use of the information set forth herein.  In such
case, you should destroy this  message and notify the sender by telephone
or e-mail."

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



JSP Error Page and Servlets

2000-08-08 Thread Patrick Buchanan

How do I use a JSP Error Page with a servlet?   I assume I use a
RequestDispatcher object to forward the request and response objects to the JSP,
but does anyone have a code example of how to accomplish this?  Do I have to
store it as a request attribute and then have code in the JSP to pull it out and
print it to the screen?  What is the easiest way here?

I want to use the same JSP error page for both my controller servlet and the
associated JSP's.

pat









"This may contain information that is confidential or privileged. If you are not
the addressee indicated in this message (or responsible for delivery of this
message to such person), you should not  copy or deliver this message to
anyone or make any other use of the information set forth herein.  In such
case, you should destroy this  message and notify the sender by telephone
or e-mail."

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Error Page?

2000-05-31 Thread Nayak Savitha

ThrowException.jsp





<%@ page
errorPage="ErrorPage.jsp"
import="java.util.Vector"
%>




<%! Vector vec = null; %>



 Let's call a method on a null Vector...

Vector has <%= vec.size() %> elements.




-
ErrorPage.jsp



<%@ page isErrorPage="true" %>




JSP Error Page





JSP Error Page

 An exception was thrown:  <%= exception %>

 With the following stack trace:


<%
ByteArrayOutputStream ostr = new ByteArrayOutputStream();
exception.printStackTrace(new PrintStream(ostr));
out.print(ostr);
%>








===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Error Page?

2000-05-31 Thread Ritesh_Srivastava

Can somebody suggest me about the error handling across JSP Pages.some code
will be useful.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: error: page has no attribute

2000-04-27 Thread K Ramesh

check the syntax of all the JSP code in your file.




Bilal Ali Nawaz <[EMAIL PROTECTED]> on 04/27/2000 15:05:49

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: K Ramesh/Chennai/HCLDELUXE)

Subject:  error: page has no attribute




hi all,
can anyone please explain why a server will throw "page has no attribute" error
when we call on a jsp from a web browser.

thanking you all in advance,
bilal.




Marc Krisjanous <[EMAIL PROTECTED]> on 04/27/2000 12:43:58 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Bilal Ali Nawaz/PK/ABNAMRO/NL)
Subject:  Re: WebSphere and JSPs



I believe I have had the same problem with some of the JSP pages that use
JSP ver 1 syntax.  What I found out was that Web sphere 2.x uses JSP ver
0.91 which does not have half of the JSP functions and directives.  make
sure  your JSP pages are using JSP ver 0.91 code syntax and functionality.

-Original Message-
From: Bilal Ali Nawaz [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 27 April 2000 3:55 PM
To: [EMAIL PROTECTED]
Subject: WebSphere and JSPs


hi all,
we are trying to install some JSPs on WebSphere 2.0 but the installation
fails.
the server returns the error: page has no attribute. i have tried the same
jsps
on jswdk1.0.1 on my local machine and they work fine. can anyone please
help??

thanking you in advance,
bilal.
_

Disclaimer:

"This  message is confidential. It may also be privileged or otherwise
protected
by  legal  rules. If you have received it by mistake please let us know by
reply
and then delete it from your system."

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets





_

Disclaimer:

"This  message is confidential. It may also be privileged or otherwise protected
by  legal  rules. If you have received it by mistake please let us know by reply
and then delete it from your system."

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



error: page has no attribute

2000-04-27 Thread Bilal Ali Nawaz

hi all,
can anyone please explain why a server will throw "page has no attribute" error
when we call on a jsp from a web browser.

thanking you all in advance,
bilal.




Marc Krisjanous <[EMAIL PROTECTED]> on 04/27/2000 12:43:58 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Bilal Ali Nawaz/PK/ABNAMRO/NL)
Subject:  Re: WebSphere and JSPs



I believe I have had the same problem with some of the JSP pages that use
JSP ver 1 syntax.  What I found out was that Web sphere 2.x uses JSP ver
0.91 which does not have half of the JSP functions and directives.  make
sure  your JSP pages are using JSP ver 0.91 code syntax and functionality.

-Original Message-
From: Bilal Ali Nawaz [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 27 April 2000 3:55 PM
To: [EMAIL PROTECTED]
Subject: WebSphere and JSPs


hi all,
we are trying to install some JSPs on WebSphere 2.0 but the installation
fails.
the server returns the error: page has no attribute. i have tried the same
jsps
on jswdk1.0.1 on my local machine and they work fine. can anyone please
help??

thanking you in advance,
bilal.
_

Disclaimer:

"This  message is confidential. It may also be privileged or otherwise
protected
by  legal  rules. If you have received it by mistake please let us know by
reply
and then delete it from your system."

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets





_

Disclaimer:

"This  message is confidential. It may also be privileged or otherwise protected
by  legal  rules. If you have received it by mistake please let us know by reply
and then delete it from your system."

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: how to get a error page

2000-04-24 Thread Hans Bergsten

Amanda Fu wrote:
>
> hi, you guys,
>
> I don't know how to get error page, codes as follow, but server always
> tell me "you might want to have an error page ...".
> myjsp.jsp:
> <%@ page import="java.util.*" errorPage="error.jsp" %>
> error.jsp:
> <%@ page isErrorPage="true" import="java.util.*" %>
>
> What mistakes have I made or ignored? Thanks.

What you have should work. If it doesn't, it's a bug in the JSP container you
use. Report it to the developers of the JSP container.

Hans
--
Hans Bergsten   [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: how to get a error page

2000-04-24 Thread Arnab Acharya

Use try, catch -- on encountering error, the code will move into catch.

> -Original Message-
> From: Amanda Fu [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, April 24, 2000 9:42 PM
> To:   [EMAIL PROTECTED]
> Subject:  how to get a error page
>
> hi, you guys,
>
> I don't know how to get error page, codes as follow, but server always
> tell me "you might want to have an error page ...".
> myjsp.jsp:
> <%@ page import="java.util.*" errorPage="error.jsp" %>
> error.jsp:
> <%@ page isErrorPage="true" import="java.util.*" %>
>
> What mistakes have I made or ignored? Thanks.
> Amanda.
>
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



how to get a error page

2000-04-24 Thread Amanda Fu

hi, you guys,

I don't know how to get error page, codes as follow, but server always
tell me "you might want to have an error page ...".
myjsp.jsp:
<%@ page import="java.util.*" errorPage="error.jsp" %>
error.jsp:
<%@ page isErrorPage="true" import="java.util.*" %>

What mistakes have I made or ignored? Thanks.
Amanda.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Error Page Directive

2000-03-17 Thread Mike McKechnie

> Just a quickie - I have placed most of my JSP code into try and catch
blocks,
> but I have also included the errorPage directive.
>
> The problem is the exception is caught and the error page is not called. I
> have even tried a jsp:forward in the catch block.
>
> Should I remove the try and catch and let the error page be displayed.
>
Just re-throw the exception (or a new one) in the catch block.

_3
M

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Error Page Directive

2000-03-16 Thread Farrin, Martin A

Hi all,

Just a quickie - I have placed most of my JSP code into try and catch blocks,
but I have also included the errorPage directive.

The problem is the exception is caught and the error page is not called. I
have even tried a jsp:forward in the catch block.

Should I remove the try and catch and let the error page be displayed.

Many thanks

Martin Farrin
Software Engineer - Intranet Solutions
BAE SYSTEMS
+44 (0)1202 408641

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Error Page

2000-02-13 Thread Arun Thomas

Ravi,

Here is an example.  Hope this helps.

-AMT


-
<%-- PageName: ErrorJSP.jsp
 ^^

This page generates a JSP error.  Note that the errorPage parameter to the
page directive identifies the relative path to the error page.
--%>
<%@ page errorPage="Error.jsp" import="java.util.*" %>



 Generate JSP Error 


<%
    request.setAttribute("from", "JSP Error Page");
Integer.parseInt("Make JSP Integer Parsing Error"); // Should throw
exception
%>



-
<%-- PageName: Error.jsp
 ^^^

This page is a JSP Error page.  Note that the isErrorPage parameter to the
page directive identifies this page as an error page.  (This allows use of
the
implicit exception object.)
--%>

<%@ page isErrorPage="true" import="java.util.*" %>

<% String originator = (String) request.getAttribute("from"); %>



 Common Error Page for Servlets & JSPs 




 Error Page for JSPs 




Error Generated in <%= originator %>.

 

This error was generated either in a JSP (identified above)
by attempting to parse a string as an integer.  The string used for this
purpose was NOT a string representation of an integer, so a NumberFormat
Exception was raised. For a real application, this page could include a
means to contact customer support, or simply to report, by email,
reoccuring
exceptions.  (Only unexpected exceptions would result in the use of
this page.)




 <%= exception.toString() %> 




<%
PrintWriter p = new PrintWriter(out, true); // Create PrintWriter with
JSPWriter
exception.printStackTrace(p);   // Use PrintWriter for output
%>






-

> -Original Message-
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Ravindranath Yagatili
> Venkata
> Sent: Friday, February 11, 2000 1:25 PM
> To: [EMAIL PROTECTED]
> Subject: Error Page
>
>
> Hi ,
> I would like to use the error page directive and would like to
> know if some
> one can send me working code of it or show me some examples
>
> Thanks & Regds,
> Ravi
>
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Error Page

2000-02-11 Thread Ravindranath Yagatili Venkata

Hi ,
I would like to use the error page directive and would like to know if some
one can send me working code of it or show me some examples

Thanks & Regds,
Ravi

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Error page not working if exception occurs after a

2000-02-01 Thread Matt Krevs

If an exception is raised in one of my JSPs after a jsp:include tag i get
the following error in the error log but my error page is not displayed

"Attempt to clear a buffer that's already been flushed
at
com.sun.server.http.pagecompile.jsp.runtime.JspWriterImpl.clear(JspWriterImp
l.java:115)
at
pagecompile.jsp._meridian._userMaint._jspService(_userMaint.java:261)..."


eg if I run the following page

<%@ page language="java" errorPage="error.jsp" %>


blah blah blah



<% int x = 4/0; %>



The result is "blah blah blah" on the screen and the buffer flushing error
is written to the webserver's error log.


If I run the following page

<%@ page language="java" errorPage="aPageWithLotsOfStuff.jsp" %>


blah blah blah

<% int x = 4/0; %>





The result is that my error page displays and shows me the divide by 0 stack
trace which is what I expect.

I searched the archives and found a reference to the buffer attribute for
the @page tag. However, no matter what I put here I still get the same
results.

Has anyone encountered this behaviour? Is there a workaround? Am I doing
something really stupid? Is this fixed in the latest JSP/Servlet
implementations?

I am using JSP1.0/JavaWebserver2.0/Windows NT4.0

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: Error Page : Which page did I come from?

2000-01-17 Thread Arun Thomas

Casey,

Since the error pages do have access to your request implicit object, you
could,
as the first action on every non-error page, simply set an attribute of your
request with a label identifying the page as the value of the attribute.

If an error occurs, this value can be extracted by the error page from the
request
object to identify where the error occurred.

-AMT


---

Example


---

<%-- Page causing error: --%>
<%@ page errorPage="Error.jsp" import="java.util.*" %>

<%
    request.setAttribute("from", "JSP Error Page");
%>


 Generate JSP Error 


<%
Integer.parseInt("Make JSP Integer Parsing Error"); // Should throw
exception
%>






<%-- Errorpage dealing with error: Error.jsp --%>
<%@ page isErrorPage="true" import="java.util.*" %>

<% String originator = (String) request.getAttribute("from"); %>



 Common Error Page for Servlets & JSPs 




 Common Error Page for Servlets & JSPs 


 

This error was generated either in <%= originator %> by attempting to
parse a string as an integer.  The string used for this purpose was NOT
a string representation of an integer, so a NumberFormat Exception was
raised.

 
<%
PrintWriter p = new PrintWriter(out, true); // Create PrintWriter with
JSPWriter
exception.printStackTrace(p);   // Use PrintWriter for output
%>









> -Original Message-
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Bragg, Casey
> Sent: Monday, January 17, 2000 11:20 AM
> To: [EMAIL PROTECTED]
> Subject: Error Page : Which page did I come from?
>
>
> Hello all!
>
>Consider that page X.jsp contains a <%@ page errorPage="Y.jsp"%>
>
>An exception occurs during processing of X.jsp.  Thus Y.jsp handles the
> exception.
>
>Is there a way of determining in Y.jsp which page caused the exception
> (X.jsp)?
>
>I tried the following to no avail <%@ page
> errorPage="Y.jsp?source=X.jsp"
> %>.  In other words, passing the source page as a parameter.  I guess that
> only makes sense as an HTTP request though.
>
>Any ideas?  I'm wanting to know if there is something built in to
> ServletRequest or someplace like that.  I'm sure there are lots of custom
> solutions.
>
>By the way, I'm running JServ 1.1b1, GNUJSP 1.0, JSDK 2.0.
>
>Thanks,
>
>Casey
>
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Error Page : Which page did I come from?

2000-01-17 Thread Bragg, Casey

Hello all!

   Consider that page X.jsp contains a <%@ page errorPage="Y.jsp"%>

   An exception occurs during processing of X.jsp.  Thus Y.jsp handles the
exception.

   Is there a way of determining in Y.jsp which page caused the exception
(X.jsp)?

   I tried the following to no avail <%@ page errorPage="Y.jsp?source=X.jsp"
%>.  In other words, passing the source page as a parameter.  I guess that
only makes sense as an HTTP request though.

   Any ideas?  I'm wanting to know if there is something built in to
ServletRequest or someplace like that.  I'm sure there are lots of custom
solutions.

   By the way, I'm running JServ 1.1b1, GNUJSP 1.0, JSDK 2.0.

   Thanks,

   Casey

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



JSP Error Page Problems

2000-01-14 Thread Peterson, Brian

I'm using JRun w/IIS.

My error page is correctly invoked when an exception occurs  After
displaying the error, I leave it up to the user to hit the browsers back
button.

Any further session operations using a JSP page cause a ClassCastException,
which seems to occur in code that's generated by JRun, such as sending HTML
code to the output stream.

Has anyone successfully used error pages?  Should I be (re)setting something
in the session so that the session becomes (in)valid?

Currently I need to shut down the browser and restart JRun to clear the
condition.

thanks,

Brian Peterson
[EMAIL PROTECTED]

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



JSP Error Page problems with JRun

2000-01-06 Thread Peterson, Brian

I'm using IIS/JRun.

My custom error page gets invoked at the appropriate times, and displays the
exception, with the following caveat:

After an exception occurs, I hit the BACK button on my browser, and when any
other JSP page gets run,  my error page gets called again with the following
exception:

java.lang.ClassCastException: java.lang.String

The funny thing is that the exception occurs in the _jspService() function,
which contains some code of mine also, from <% %>, and the exception usually
happens while writing out HTML code via out.print( "..." ).

Other than that, I've had a lot of success with IIS/JRun.

Any suggestions?

Thanks,

Brian Peterson

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: The Error Page Directive

1999-11-29 Thread Tom Preston

Your jsp/servlet server probably has some form of -keepgenerated option on it.
Find this, turn it on, and you will be able to see the Servlets (.java file) that
is generated
for you when you compile a .jsp.

When you review the .java file you will see that a try catch block is put in your
_service method automatically when you have an error page declared.  Exceptions
that you do not explicitly catch in the jsp will make it to this try block.

The try block has a nested try block.

If the output has already be "committed", you will not hit the error page (because
headers have
already been written), instead you will hit the inner catch.  If output has not
been committed,
you will be redirected to the errorpage.

--
Tom

Thomas Preston
Vacation.com, Inc.

Masaoud wrote:

> Hi,
>
> I was just wondering, as to what the <%@ page errorPage="somePage.jsp"
> %> actually do ?
> When does this "somePage.jsp" get invoked ? Is it done automatically ?
> If  I have cases wherein there may be multiple errors for which I wish
> to standerdaize the error display, can I use a single "errorpage.jsp" to
> perform that ?
>
> Thanx
>
> Masaoud.
>
> ===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



The Error Page Directive

1999-11-29 Thread Masaoud

Hi,

I was just wondering, as to what the <%@ page errorPage="somePage.jsp"
%> actually do ?
When does this "somePage.jsp" get invoked ? Is it done automatically ?
If  I have cases wherein there may be multiple errors for which I wish
to standerdaize the error display, can I use a single "errorpage.jsp" to
perform that ?

Thanx

Masaoud.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: JSP error page from Servlet problem .

1999-11-17 Thread AndySoft

> try
> {
>
> getServletConfig().getServletContext().getRequestDispatcher("error
> .jsp?error
> =fatal error").forward  (request,response);
>
> } catch (Exception ex) {
> ex.printStackTrace ();
> }

try this instead:

request.setAttribute("error","fatal error");
getServletConfig().getServletContext().getRequestDispatcher("error.jsp").for
ward(request,response);

> <%
> String error=(String)request.getParameter("error");
> out.println(error);
> %>

then in the jsp write this:
<%=request.getAttribute("error") %>

AndySoft

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: JSP error page from Servlet problem .

1999-11-17 Thread Hans Bergsten

Samuele Brignoli wrote:
>
> I hope that someone good with JSP and Servlet can help me ...
>
> I'm triying to send an error message to a jsp page called error.jsp located
> in c:\Apache_Group\Apache\htdocs\folder1\
> from a servlet MultitelPay.jsp located in the same directory,
> c:\Apache_Group\Apache\htdocs\folder1\.
> In my servlet I've tried this code :
>
> try
> {
>
> getServletConfig().getServletContext().getRequestDispatcher("error.jsp?error
> =fatal error").forward  (request,response);
>
> } catch (Exception ex) {
> ex.printStackTrace ();
> }

The uri path argument to getRequestDispatcher must start with a slash ("/")
and is interpreted relative to the context's base URI. So if you use the default
context (base URI = "/") and it's docbase is "c:\Apache_Group\Apache\htdocs",
you must use

  getRequestDispatcher("/folder1/error.jsp?error=fatal+error")

Also note that the parameter value must be URL encoded (space replaced with
plus sign) and that there's no guarantee that the query string parameters
are passed on to the target in a Servlet 2.1 container (it's added to the
spec in Servlet 2.2). If you're using a 2.1 container you may want to look
at using request attributes to pass info to the target instead (see the 2.1
or 2.2 spec for details).

The reason you get an "internal error" should be clear if you look in the
servlet container log file. Most likely you will find a NullPointerException,
since getRD returns null in your example and trying to call forward() on
null doesn't work.

--
Hans Bergsten   [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



JSP error page from Servlet problem .

1999-11-17 Thread Samuele Brignoli

I hope that someone good with JSP and Servlet can help me ...


I'm triying to send an error message to a jsp page called error.jsp located
in c:\Apache_Group\Apache\htdocs\folder1\
from a servlet MultitelPay.jsp located in the same directory,
c:\Apache_Group\Apache\htdocs\folder1\.
In my servlet I've tried this code :



try
{

getServletConfig().getServletContext().getRequestDispatcher("error.jsp?error
=fatal error").forward  (request,response);

} catch (Exception ex) {
ex.printStackTrace ();
}




and in the jsp I have :


<%
String error=(String)request.getParameter("error");
out.println(error);
%>


The error message is :
---
Internal Server Error
The server encountered an internal error or misconfiguration and was unable
to complete your request.
Please contact the server administrator, [EMAIL PROTECTED] and inform them of
the time the error occurred, and anything you might have done that may have
caused the error.

More information about this error may be available in the server error log.



Apache/1.3.9 Server at sirius Port 80



Can someone help me ?

Thanks, Samuele.




**
Samuele Brignoli - Sinapsi S.r.l.
Viale Gorizia 2 - Milan - Italy
+39 2 8392554
[EMAIL PROTECTED]
http://www.sinapsi.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: Calling an JSP Error Page from a Servlet

1999-11-10 Thread Craig Cottingham

Yes. You need code in your servlet something like this:

protected void callPage(String page, HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
{
ServletContext context = getServletContext();
RequestDispatcher dispatcher =
context.getRequestDispatcher(page);
dispatcher.forward(request, response);
}

The easiest way I've found to pass values from a servlet to an output JSP is
to attach them to the servlet session. In other words, your error JSP might
contain code like this:


Error code: 

--
Craig S. Cottingham
[EMAIL PROTECTED]
PGP key available from:
<http://pgp.ai.mit.edu:11371/pks/lookup?op=get&search=0xA2FFBE41>
ID=0xA2FFBE41, fingerprint=6AA8 2E28 2404 8A95 B8FC 7EFC 136F 0CEF A2FF BE41

> -Original Message-
> From: luke olegario [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 10, 1999 4:46 AM
> To:
> Subject: Calling an JSP Error Page from a Servlet
>
>
> Hi,
>
> Is it possible to call a JSP error page from a servlet?  If
> it's so, how
> would you invoke it and how would you pass the exception
> object for the JSP
> error page to process?
>
> Regards,
> Luke
>
> __
> Get Your Private, Free Email at http://www.hotmail.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Calling an JSP Error Page from a Servlet

1999-11-10 Thread luke olegario

Hi,

Is it possible to call a JSP error page from a servlet?  If it's so, how
would you invoke it and how would you pass the exception object for the JSP
error page to process?

Regards,
Luke

__
Get Your Private, Free Email at http://www.hotmail.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html