Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

access to servlet

 
prabaha reddy
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
as far i read there are two ways to access servlets in Tomcat

http://localhost:8080/webapp-name/urlpattern
or
http://localhost:8080/webapp-name/servlet/servlet-name

so my doubt is will the second url works for tomcat5.x
 
cool boss
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A servlet can be called with any name. You just have to add the url mapping for the servlet in the web.xml properly. The second is only a convention not another "method".
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By default, the invoker servlet is disabled in modern versions of Tomcat.
This means that the second method won't work unless you uncomment the entries for it in TOMCAT_HOME/conf/server.xml.

Read this to see why you shouldn't:
http://jakarta.apache.org/tomcat/faq/misc.html#evil
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic