Solved

Application deployment on Tomcat 5.5

Posted on 2006-06-17
1
215 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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

728 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