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

Question about JavaWebServer error 403


Joined: Dec 21, 2001
Posts: 2
I'm not sure if this is the correct medium for this question as I am still very new to Java and more so to this forum. Anyway, I have been building a website using a servlet to call up an image in a separate window (separate from the main window which is where the user would click). But instead of the image, I get a server error that says:
"Forbidden (403), You have requested data that the server has decided not to provide to you. Your request was understood and denied."
This doesn't make any sense to me as the server and the files are all on my harddrive. I am using JavaWebServer 1.1. Any help would be greatly appreciated.
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
A couple of things.
First, we have a JavaRanch naming policy.
Your ID should be 2 separate names with more than 1 letter each. We really want this to be a professional forum and would prefer that you use your REAL name. So Please re-register with a valid name.
Next, I think that the folks over in the Servlets Forum are much more likely to be able to help you with this - so I will transfer the question over there.

"JavaRanch, where the deer and the Certified play" - David O'Meara
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

I never did understand why the forum software hasn't been modified to enforce the name standard.
A Web Server is NOT a file server. It's a program that takes a URL and returns content. That content MAY be done by pushing the contents of a file to the user wrapped in HTTP packaging or it MAY Be entirely created dynamically. A file server does no visible wrapping and has doesn't create dynamic content.
So effectively, every HTTP request causes a "program" (or servlet, if you prefer) to be run. It's just that sometimes this "servlet" is one that dissects the URL to find a file and copy it back to the client
A "403" indicates that the "servlet" does not wish to return a response because it thinks you're asking for something you're not entitled to. In the case of the "file copier", this usually means that the file copier converted the URL to point to a file THAT THE WEB SERVER is forbidden to read. Note the emphasis. YOU may have access rights under YOUR network signon, but the Web Server is signed on under its own account, and that's normally whose access rights are being checked.
It's also possible that the URL isn't translating to the file path that you think it is, since the "directories" in a URL are logical objects and are often remapped to arbitrary file directories.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Question about JavaWebServer error 403
It's not a secret anymore!