Solved

Application deployment on Tomcat 5.5

Posted on 2006-06-17
1
214 Views
Last Modified: 2010-04-20
Hello

I cannot seem to run a simple servlet on tomcat 5.5

a. The servlet is located in C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\classes.
b.The servlet is called helloservlet
c. The servlet was succesfully compiled using javac. The class file that was generated is located in the directory listed in a.
d. I am using the following syntax in internet explorer to run the servlet: http://localhost/servlet/helloservlet
e. I get the following error in internet explorer: "the page cannot be found"
f. My tomcat installation does work, as I am able to view the default page (index.jsp) using internet explorer.

Why can't I execute the servlet. The servlet merrely prints the words hello.
 
0
Comment
Question by:adimit99
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
Tol_cv earned 500 total points
ID: 16999677
if the servlet is located in C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\classes., the access url shoud be
http://localhost:<tomcat_port>/helloservlet, where  tomcat_port is obiovsly the tomcat port (8080 if you didn't chnaged configuration).

also the servlet should be added in web.xml - in your case C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\web.xml.
However you shouldn't depploy new applications in the ROOT context,  you should make anothe one - like C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\test\  and put everything in there (WEB-INF, etc)...  You can  use tomcat manager to deploy  applications also

 a good article on tomcat deplyments you can find here:
http://www.onjava.com/pub/a/onjava/2001/04/19/tomcat.html
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question