Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlet won't run  RSS feed

 
Rob Wehrstein
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I followed the tutorial at http://content.hccfl.edu/pollock/ajava/war/jmyservletwar.htm I compiled the java sources, and then packed everything into a war file. I also added a file mywebapps.xml to /etc/tomcat6/Catalina/localhost/ that directs tomcat to the userspace directory holding myServletWAR.war. My servlet still won't run. What am I doing wrong?

I can see index.html page in my browser. I can also see the jsp page. What I can not see is the servlet. At the URL, http://192.0.0.4:8080/mywebapps/myServletWAR/HelloServlet, I get the following error message:
HTTP Status 404 - /mywebapps/myServletWAR/HelloServlet
type Status report
message /mywebapps/myServletWAR/HelloServlet
description The requested resource (/mywebapps/myServletWAR/HelloServlet) is not available.
Apache Tomcat/6.0.35

Also, at the URL, http://192.0.0.4:8080/myServletWAR/servlet/HelloServlet, I get this error message:
HTTP Status 503 - This application is not currently available

type Status report
message This application is not currently available
description The requested service (This application is not currently available) is not currently available.
Apache Tomcat/6.0.35

 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36396
453
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob,
Welcome to CodeRanch!

Ironically, I'm getting a 404 at the hccfl.edu url you posted. Can you post your web.xml? Also are there any error messages in the tomcat logs? Does it say that the servlet started up?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65824
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please check the ServletsFaq for an entry with a list of things you should check.
 
Rob Wehrstein
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:Rob,
Welcome to CodeRanch!

Ironically, I'm getting a 404 at the hccfl.edu url you posted. Can you post your web.xml? Also are there any error messages in the tomcat logs? Does it say that the servlet started up?




This is the web.xml file:


The file "catalina.2013-10-08.log" is below. The servlet "HelloWorld2" use to exist, but it does not any more.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65824
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please work through the list in the ServletsFaq -- I see at least one glaring problem that that list covers.

The version problem message means that you have compiled the classes with a later version of Java than the container is running.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!