• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

trouble loading servlet class on Tomcat4.1

 
rick collette
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I installed Tomcat4.1.24. I could load jsp files in
TOMCAT_HOME/webapps/ROOT directory into browser like this:
http://localhost:8080/sample.jsp
but HTML files in ../ROOT dir cannot be loaded.
but I could not load servlets classes from
TOMCAT_HOME/webapps/ROOT/WWEB-INF/classes into
the brwowser:
http://localhost:8080/servlet/myservlet
I had no problem to load servlet classes when I
was using Tomcat4.0.1. I am wondering what is wrong
with it.
Thanks,
Rick
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should be able to address html files in the ROOT directory with
http://localhost:8080/thefile.html
(ROOT = "/")
The reason you can't use the /servlet/ URL nomenclature is that Tomcat 4.24 has the "invoker" servlet turned off by default - the opposite of most earlier Tomcats.
Search for "invoker" in the TOMCAT-HOME/conf/web.xml file for a discussion.
Bill
 
newworld kingdom
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the same question, I found the "invoker" in the TOMCAT-HOME/conf/web.xml file,but how can I turn it on?
 
newworld kingdom
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Turn it on ,just like this?
<servlet-mapping>
<servlet-name>invoker</servlet-name>
<url-pattern>/servlet/*</url-pattern>
</servlet-mapping>
But I still can't load servlet class after restart the server.
Anybody can help me? thanks!
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where did you put the compiled class and how did you try to address it?
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic