Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within OCPJWCD
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Paul Clapham
Tim Cooke
Devaka Cooray
Sheriffs:
Liutauras Vilda
paul wheaton
Rob Spoor
Saloon Keepers:
Tim Moores
Stephan van Hulst
Tim Holloway
Piet Souris
Mikalai Zaikin
Bartenders:
Carey Brown
Roland Mueller
Forum:
Web Component Certification (OCEJWCD)
getting error code in pagenotfound.jsp
hasan khan
Ranch Hand
Posts: 223
I like...
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
my web.xml looks like this
<error-page>
<error-code>404</error-code>
<location>/pagenotfound.jsp</location>
</error-page>
<error-page>
<error-code>403</error-code>
<location>/pagenotfound.jsp</location>
</error-page>
i have created a common page for 2 different error code.
i want to show different message for different error code.
in pagenotfound.jsp how can i find that what error code cause this page to be called ?
Nitish Bahadur
Ranch Hand
Posts: 118
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Read the "javax.servlet.error.status_code" request attribute in your error page. This should be either 403 or 404.
In the real world, the web servers have pre-defined error pages for the HTTP Status codes between 300-400 and 400-500.
hasan khan
Ranch Hand
Posts: 223
I like...
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
how do i use those pre-defined error pages for the HTTP Status codes between 300-400 and 400-500.
i am using weblogic 8.1 as well as
tomcat
5.0.28
SCJP, SCWCD
We can fix it! We just need some baling wire, some WD-40, a bit of duct tape and this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Handling 404 Error
Please Help - Using JSF
problem using error-page tag
redirect if error 404 comes
How to configure custom error pages in jboss-5.1.0?
More...