• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error-page tag and sendError

 
sangeeta kapoor
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • 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
 
Deepa Korecherla
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got correct result i.e, from the Forbidden.jsp....
check if the location of ur jsp is right
 
Francois Roland
Ranch Hand
Posts: 34
Java
  • Mark post as helpful
  • send pies
  • 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.
 
Pushkar Raste
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic