• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Servlet configuration

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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: java.io.FileNotFoundException. 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,
Brett
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Bill
 
Tony Paulino
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sweet. Thanks for the reference. I'm now getting a new error when I run it:

Error reading from servlet.
java.io.IOException: Server returned HTTP response code: 500 for URL: http://www.orcsports.com:2001/orcsports/servlet/IOServlet
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at PlaybackApplet.run(PlaybackApplet.java:293)
at java.lang.Thread.run(Unknown Source)
Server returned HTTP response code: 500 for URL: http://www.orcsports.com:2001/orcsports/servlet/IOServlet

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
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.)
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for posting back, Tony.
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic