This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Websphere and the fly likes How to custom 404 error page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "How to custom 404 error page" Watch "How to custom 404 error page" New topic
Author

How to custom 404 error page

Yi Si
Ranch Hand

Joined: Nov 12, 2003
Posts: 54
Hi, everyone
When i hit url like
http://hostname ort/contextroot/a.jsp
if a.jsp doesn't exist i get websphere error page.
---------------------------------
JSP Processing Error JSPG0036E :
Failed to find resource a.jsp
---------------------------------
Can somebody know how to custom such error page by websphere setting?


Sun(java)-SCJA SCJP SCWCD SCBCD SCDJWS SCEA<br />Sun(solaris)-SCSA SCSN<br />IBM-486 Object-Oriented Analysis and Design with UML Test <br />IBM Certified System Administrator - WebSphere Application Server Network Deployment V6.0<br />Oracle-OCA
Vijay K Vivek
Greenhorn

Joined: Oct 11, 2007
Posts: 27
It can be done by the usual way of customising error pages by declaring the customised jsp against 404 error in the web.xml by adding the below entry.

<error-page >
<error-code >404 </error-code >
<location>/xxyyzz.jsp </ location >
</ error-page>

But I am not sure if I understand your question correctly because this is common place and you are already SCWCD certified. Can you be more specific if this does not answer your question?

[ October 21, 2007: Message edited by: Vijay K Vivek ]

[ October 21, 2007: Message edited by: Vijay K Vivek ]
[ October 21, 2007: Message edited by: Vijay K Vivek ]
Kant Hung
Greenhorn

Joined: Nov 17, 2008
Posts: 1
For some strange reason, after I added above tag to the web.xml, I am stilling getting the standard 404 page from WAS. Did I miss something?

Thanks for your time.
[ November 17, 2008: Message edited by: Kant Hung ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to custom 404 error page