Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Application deployment on Tomcat 5.5

Posted on 2006-06-17
1
Medium Priority
?
217 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 1500 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

Turn your laptop into a mobile console!

The CV211 Laptop USB Console Adapter provides a direct Laptop-to-Computer connection for fast and easy remote desktop access with no software to install.

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 …
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

670 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