• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

error-page tag and sendError

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the following entry in my DD


<error-page>
<error-code>403</error-code>
<location>/Forbidden.jsp</location>
</error-page>


and a jsp page with the following code

<% response.sendError(403); %>

I was expecting the response to come from Forbidden.jsp but instead it gave me this message

You are not authorized to view this page
You might not have permission to view this directory or page using the credentials you supplied.

--------------------------------------------------------------------------------

If you believe you should be able to view this directory or page, please try to contact the Web site by using any e-mail address or phone number that may be listed on the localhost:8080 home page.

You can click Search to look for information on the Internet.




HTTP Error 403 - Forbidden
Internet Explorer


Why didn't the error page tag in DD not work
 
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got correct result i.e, from the Forbidden.jsp....
check if the location of ur jsp is right
 
Ranch Hand
Posts: 34
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After verifying you haven't made any typo, and if you use Internet Explorer, verify that you didn't activated sipmplified HTTP error messages in your IE oprions.
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sangeeta,

if you r using IE then go to
Tools->Internet Options

click advanced tab n uncheck "Show friendly HTTP error messages"

this will definately work

thanks
Pushkar S. Raste
reply
    Bookmark Topic Watch Topic
  • New Topic