I have a servlet in test.war (examples.servlet.testServlet) and defined it in the web.xml and mapped to testServlet in the servlet mapping.
When I access this servlet http:/localhost:7001/testServlet, I get the following error:
Error 403--Forbidden
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.4 403 Forbidden
The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the entity. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.
Using Weblogic 6.1 apps server.
Not sure what I'm doing wrong. Your help is greatly appreciated.
Srikumar
Discussions
Web tier: servlets, JSP, Web frameworks: Error 403--Forbidden when trying to access the servlet
-
Error 403--Forbidden when trying to access the servlet (3 messages)
- Posted by: Srikumar Gopal
- Posted on: September 12 2002 19:30 EDT
Threaded Messages (3)
- Error 403--Forbidden when trying to access the servlet by joseph yi on September 13 2002 15:45 EDT
- Error 403--Forbidden when trying to access the servlet by Santosh Mani on September 16 2002 01:08 EDT
- Error 403--Forbidden when trying to access the servlet by Srikumar Gopal on September 18 2002 16:27 EDT
-
Error 403--Forbidden when trying to access the servlet[ Go to top ]
- Posted by: joseph yi
- Posted on: September 13 2002 15:45 EDT
- in response to Srikumar Gopal
Code to be executed when a user enters the URL directly or redirects to a servlet URL should be put in the doGet method. Code to be executed on <form> submissions should (but not necessarily) be in the doPost method (depending on if the user should see it in the URL or not).
You probably have a doHead method and that access restrictions on how it's accessed.
Try using doGet and doPost unless you have a specific requirement for doHead...
-
Error 403--Forbidden when trying to access the servlet[ Go to top ]
- Posted by: Santosh Mani
- Posted on: September 16 2002 01:08 EDT
- in response to Srikumar Gopal
My understanding is that you need to include the web app context while invoking the servlet, irrespective of the mapping you may have defined.
So the correct url would be: http://hostname/appcontext/servletalias
-
Error 403--Forbidden when trying to access the servlet[ Go to top ]
- Posted by: Srikumar Gopal
- Posted on: September 18 2002 16:27 EDT
- in response to Santosh Mani
Thanks for your help.
Adding the context root helped.
On a different note:
Is there a way to call the servlet without mentioning the context root.
Could the URL be this way :
http://hostname/servletalias
which in turn refers to
http://hostname/appcontext/servletalias
I'm using bea weblogic 6.1 and iPlanet w/s 4.1
Thanks
Srikumar