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

Servlet configuration

Tony Paulino

Joined: Apr 02, 2006
Posts: 3
I am trying to set up a servlet on my server:
Windows XP
Apache for Windows
Tomcat 5.0.28

After installing Tomcat, I can go to the sample servlet directory and see the HelloWorld servlet at HelloWorldExample. When trying to load my own servlet through an applet at sample game (click the playback image if you want to try), I get an Error reading from servlet: Further, when I copy the HelloWorld servlet to the folder I set up for my servlet, I get a 404 error - The requested resource [...] is not available. What configuration setting am I missing to get this to work?

I've read where I should not need /servlet/ in my URL, but the sample works that way, and the old server where this worked (which was on a previous version) included that in the URL. I'll fix that later.

Thanks in advance,

Apparently Brett Paul is already registered.
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
Your problem could easily be related to the use of /servlet/ in the address. Read this FAQ on the invoker.
Here is the more complete error message I just got:

It looks like your PlaybackApplet could do with some better error trapping and reporting.
Tony Paulino

Joined: Apr 02, 2006
Posts: 3
Sweet. Thanks for the reference. I'm now getting a new error when I run it:

Error reading from servlet. Server returned HTTP response code: 500 for URL:
at Source)
at Source)
Server returned HTTP response code: 500 for URL:

I unfortunately need to catch a plane. I will look into that error when I get back next week, but I think it marks progress.

On the error trapping side - I agree. This applet could use a LOT of work. I wrote it something like 7 years ago under 1.0 or 1.1.
Tony Paulino

Joined: Apr 02, 2006
Posts: 3
The applet/servlet combination is working again. Thanks for your help! (I actually fixed it just before I left for that trip, but am just now getting back to reading stuff again.)
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Thank you for posting back, Tony.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: Servlet configuration
It's not a secret anymore!