• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problems getting servlets to work with inovoker servlet disabled

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic