Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

unable to start servlet

 
jyotsana dang
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i created a java servlet file.. registration.java and compiled it and added the class file in root/web-inf/classes folder..
in the action of the form i used /servlet/registration
but when i try to run the serlvet the page displays a message :
The requested resource (/servlet/Registration) is not available.
where is the bug?
jyotsana
 
nick zhao
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Your catalog is 'ROOT', so you have to access the servlet by the form like '/Registration'.
The accessing was right if you deployed the servlet's url pattern in the web.xml like '/servlet/Registration'.
 
jyotsana dang
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have my folder in root folder of tomcat and the servlet class file in root/web-inf/classes folder created ..
and form action as: /servlet/Registration
but even the it gives the same error
jyotsana
 
Basavaraju Banakar
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try "../servlet/Registration"
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your use of the "/servlet/..." style of URL requires the Invoker servlet - see any of the recent threads about "servlet can't start" and similar problems.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic