File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes error 403 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "error 403" Watch "error 403" New topic

error 403

Praveen Raja

Joined: May 01, 2000
Posts: 13
i have set up the classpath.
and have servletrunner at port 8080.
my class files r stored at d:\jsdk2.0\servlets\
and servletrunner is at d:\jsdk2.0\bin
in the browser i when i give http://localhost:8080/servlets/myservlet i get 403 forbidden error. what could be the problem?
surya sadhu

Joined: Feb 16, 2004
Posts: 13
Put your class files under jsdk2.0/examples.
Check whether the path and classpath are properly set or not
Praveen Raja

Joined: May 01, 2000
Posts: 13
I tried that also, outting my class files under d:\jsdk2.0\examples
i have set my path to d:\jsdk2.0\bin
and set classpath=.;d:\jask2.0\lib\jsdk.jar
what else could be the problem
Tony Alicea

Joined: Jan 30, 2000
Posts: 3226
Error 403: No Directory Browsing Allowed
You are trying to browse a DIR with no index.html page and are not allowed to see the contents of the directory which is what would normally happen if you had permission to list the DIR and no default HTML page was present.

Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Try this
Servletrunner -d yourservletdir(d:\mystuff\servlet)
-d Servletdir
also check
Servletrunner /?
you will get more information.
Praveen Raja

Joined: May 01, 2000
Posts: 13
thanks ppl. the problem seemed to be that i was using http://localhost:8080/servlets/myservlet instead of http://localhost:8080/servlet/myservlet
thanks 4 ur help
I agree. Here's the link:
subject: error 403
It's not a secret anymore!