• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

First time using Tomcat

 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Mathias Nilsson
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got it now. I had to stop tomcat, delete all files in the work cataloge and then try again an it worked.
// Mathias
 
Sheriff
Posts: 4012
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Drove my Chevy to the levee but the levee was dry. A wrung this tiny ad and it was still dry.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic