• 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

problem while running servlet

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello !
I've installed servlet programming environment recently
Tomcat 1.4
eclipse
I'm trying to run a simple servlet and can't to do it
I've tryed to put class file of this servlet into webapps/ROOT/
and run it _http://localhost:8080/servlet/Hello
in both cases 404 error appers
In the same time jsp pages without servlets work fine
What's a problem


Thanks
[ September 01, 2003: Message edited by: Kaspar Minosiants ]
 
Author
Posts: 399
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how abt an entry in web.xml
the web.xml must be in webapps\ROOT\WEB-INF
and what about the url that you are giving:
http://localhost:8080/tr/servlet/Hello
What exactly does "tr" specify..??..is your servlet mapped to this particular URL..??
hth
MB
 
Kaspar Minosiants
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've just edit post
This was link to run servlet which is in exlipse project
tr dir have bin added into server.xml file of Tomcat
_http://localhost:8080/tr/servlet/Hello
After i saw that it didn't work i moved Hello.class file into webapps\ROOT\WEB-INF\classes
and used _http://localhost:8080/servlet/Hello to run it
it doesn't work in both cases .
It's not normal behaviour. Is it ?


how abt an entry in web.xml
the web.xml must be in webapps\ROOT\WEB-INF


there is this file in this dir
there is it's content. I've not edited it

Thanks for reply
[ September 01, 2003: Message edited by: Kaspar Minosiants ]
[ September 01, 2003: Message edited by: Kaspar Minosiants ]
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
webapps\ROOT\ is for the ROOT so-called-default application. but u should have webapps\tr\WEB-INF\classes...
i hope u got the point! create the "tr" directory...
 
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
As I think I already answered elsewhere, it looks like you have been bit by the "invoker" servlet. The URL usage .../servlet/Hello requires that the invoker servlet be turned on. See the ../conf/web.xml file, search for "invoker"
This has GOT to be the most common problem we see here. Due to the fact that before Tomcat 4 the invoker was on by default and most of the servlet books used the ../servlet/ style because it didn't involve explaining web.xml entries for servlets.
Bill
 
Kaspar Minosiants
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks A Lot !
William Brogden


....requires that the invoker servlet be turned on


It was the reason of my trouble
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic