Hi,
You should use a URL relative to the "root" of your application; ie, if your
directory structure is as follows...
application_root/jsp/news/news.jsp
application_root/jsp/failure/failure.jsp
application_root/WEB-INF/classes
In the page diective of news.jsp use
<%@ page session='true' errorPage='/jsp/failure/failure.jsp' %>
^^
This '/' will always resolve to the root of your application.
Hope this helps,
Stephen.
Yashwant Balwant wrote:
>
> I have question regarding error handling in JSP.
> My site say 'Today' has two jsp files under two seperate folders
> namely
> 'News.jsp' under 'News' folder and 'failure.jsp' under 'failure'
> folder. As you can see failure is my error page.
> Now when an exception occurrs in news.jsp, my error page gets called
> but the 'errorPage' attribute of 'page' directive says
> "../failure/failure.jsp".
> This is where the call fails and WebSphere gives me compilation
> error since it cannot resolve '..' and I don't know how to go up the tree.
> Because of our products structure, the failure page cannot be under same
> folder.
> Can anyone please tell me how to get thsi path resolved? I wanted to
> make the code neat with error handling... I don't want to use try.catch
> everywhere in my jsp code or sendRedirect. As I use beans I don't
> have servlet context in my java code.
>
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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
--
._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
Stephen Redmond Logica (Mobile Networks)
Tel: +353-1-8193673 5 Custom House Plaza,
Fax: +353-1-8193401 Harbourmaster Place,
mailto:[EMAIL PROTECTED] Dublin 1,
http://www.logica.com/telecoms Ireland.
._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
===========================================================================
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