Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

trouble loading servlet class on Tomcat4.1

 
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
 
Author and all-around good cowpoke
Posts: 13078
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
 
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
Posts: 13078
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
reply
    Bookmark Topic Watch Topic
  • New Topic