File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Products » Tomcat
Bookmark "First time using Tomcat" Watch "First time using Tomcat" New topic

First time using Tomcat

Mathias Nilsson
Ranch Hand

Joined: Oct 13, 2003
Posts: 107
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
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

Joined: Jan 19, 2001
Posts: 4012
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,
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
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.
I agree. Here's the link:
subject: First time using Tomcat
It's not a secret anymore!