This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems getting servlets to work with inovoker servlet disabled

 
Craig Angus
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a servlet in the following directory
D:\ApacheGroup\jakarta-tomcat\webapps\golf_club_dev\WEB-INF\classes\com\golfclub\Controller.class
My web.xml is

and I am calling the servlet as follows
http://localhost/golf_club_dev/Controller?HsMethod=1
when I call the servlet I get the http 404 file not found error.
I cannot figure out why this is happening?
Any idea anyone?
Thanks,
Craig
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have any System.out.println or other indication that the init method of the servlet is being called? How about the doGet method?
Bill
 
Craig Angus
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the only line I that appears in tomcat when calling the servlet is the following line
2003-04-04 05:02:59 - Ctx( /golf_club_dev ): 404 R( /golf_club_dev + /Controller
+ null) null

so I dont think it is hitting the servlet at all,
there is no init method in my servlet. the servlet is used for redirecting pages, it uses the HsMethod for switch statement to redirect to the correct page.
It was working fine when I had the Invoker Servlet defined in the server.xml, but since I have commented out the invoker servlet line
[code]
<RequestInterceptor className="org.apache.tomcat.request.InvokerInterceptor" debug="0" prefix="/servlet/"/>
[code]
I have a lot of system,out.println's in the doGet method within the switch statement, but they dont appear.
I think it is more a set up problem, because if you mispell the HsMethod (HSMETHOD) no error occours, which happened when the when I had the Invoker Servlet defined in the server.xml
It seems that tomcat is unaware of the presence of the actual servlet
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic