You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Craig O'Brien <cr...@dynamic-apps.com> on 2001/04/23 20:21:46 UTC
RE: seems as though a servlet engine would have a little clearer documentation on getting servlets running
Just call your servlet as http://hostname/servlet/yourservletname
Perhaps simpler then you thought. You will never call the WEB-INF directory
in a url. That is for internal routing. You didn't tell apache to route to
a WEB-INF directory did you?
If that doesn't work simplify more and call
http://hostname:8080/servlet/yourservletname that will bypass mod_jk. If
that isn't working your servlet is not placed correctly or you are missing
the servlet.jar. Put your servlet in the same directory that you find
snoopServlet.
Regards,
Craig
-----Original Message-----
From: Dan & Sharon [mailto:srf3@dana.ucc.nau.edu]
Sent: Monday, April 23, 2001 10:56 AM
To: tomcat-user@jakarta.apache.org
Subject: seems as though a servlet engine would have a little clearer
documentation on getting servlets running
ok,
install tomcat,
jsps are workin,
made new context,
jsps are workin in it,
write a servlet(5 min),
try to get servlet working(5 hr),
read documentation,
it says put servlets in WEB-INF/classes dir, did that
it says add servlet to WEB-INF/web.xml, did that
<web-app>
<servlet>
<servlet-name>servtest.class</servlet-name>
<servlet-class>servtest.class</servlet-class>
</servlet>
</web-app>
restart tomcat(can't believe this has to be done everytime a servlet
gets added or changed), did that
it says call your servlet with
"http://thehost/WEB-APP/servlet/theservletname"
did that
response: 404
there's no servlet directory, kinda makes sense, but i thought mod_jk
was taking care of that. HMM.
so now that i've followed the instructions and that didn't work, i make
a servlet directory and add my servlet there. web browser tries to
download and save it to my disk, no display.
i'm sure that this being a servlet engine, it would probably serve
servlets, otherwise that would be really embarrasing for the
programmers, so, anyone got any suggestions?