Forums Register Login

problem while running servlet

+Pie Number of slices to send: Send
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 ]
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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 ]
+Pie Number of slices to send: Send
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...
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
Thanks A Lot !
William Brogden


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


It was the reason of my trouble
Legend has it that if you rub the right tiny ad, a genie comes out.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 801 times.
Similar Threads
tomcat can't find index.jsp
Servlet HelloWorld problem
No "welcome" page at all
howto invoke servlet
Cannot resolve symbol
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2024 01:01:36.