aspose file tools*
The moose likes Tomcat and the fly likes First time using Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "First time using Tomcat" Watch "First time using Tomcat" New topic
Author

First time using Tomcat

Mathias Nilsson
Ranch Hand

Joined: Oct 13, 2003
Posts: 107
Hi!
I am trying to develop a webapplication with jsp , tomcat.
I can access my jsp files , html files using the
localhost:8080/myproject/test.jsp and so on. I can access a bean from my project but I can't access my servlet. What am I doing wrong?
I compiled the servlet in the d:\tomcat4.0\webapps\myproject\web-inf\classes\ dir.
When I try to access it I use
localhost:8080/myproject/servlet/Hello
I can't get it to work.
Does somebody know what I'm doing wrong
// Mathias Nilsson


SCJP2 , MCP( 70-229 ) , Preparing For SCWDC
Mathias Nilsson
Ranch Hand

Joined: Oct 13, 2003
Posts: 107
I got it now. I had to stop tomcat, delete all files in the work cataloge and then try again an it worked.
// Mathias
Pauline McNamara
Sheriff

Joined: Jan 19, 2001
Posts: 4012
    
    6
Hi Mathias, glad you got your problem solved. On a good day all the problems seem solvable - got another little one for you, and it's real easy to fix (this must be a good day already)
Your display name doesn't quite fit the famous JavaRanch naming policy. Could you please take a minute to change your display name to show 2 names, preferably your real name. (It's all about maintaining our professional image - don't let the one-eyed moose fool you!).
Welcome to JavaRanch and hope you'll be visiting often,
Pauline
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12675
    
    5
Two things:
1. Using the ../servlet/myServlet url approach to fire the "invoker" servlet will cause you nothing but trouble as seen in MANY MANY postings here recently. Much better to correctly map your servlet directly to a URL in web.xml.
2. Tomcat has a lovely management servlet that will allow you to restart and otherwise control an application without stopping and starting Tomcat.
Bill


Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: First time using Tomcat
 
Similar Threads
Tomcat installation on Windows2000 Server
RPC deployment problem
Servlets don't start in tomcat 4.1
Not Found Error
Tomcat 5.0.30 - 404 error with HTML file (Head First Beer example)