Solved

Application deployment on Tomcat 5.5

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

747 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now