Solved

Application deployment on Tomcat 5.5

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

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…
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

863 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

22 Experts available now in Live!

Get 1:1 Help Now