Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlet Alias(urgent)  RSS feed

 
Malhar Barai
Author
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all
i want to use servlet alias. i dont want the servlet diretory to be seen to the user..i.e
http://www.abc.com/servlet/<servletname> should not be seen instead it should be accessed with an alias like:
http://www.abc.com/<anyname>
how is it possible on Apache Web Server.
plz all its very urgent.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming you are using Tomcat with Apache, that is accomplished with the servlet-mapping tag in web.xml - here is an example from Tomcat\examples\WEB-INF\web.xml
<servlet-mapping>
<servlet-name>snoop</servlet-name>
<url-pattern>/snoop</url-pattern>
</servlet-mapping>
You should download the servlet API from java.sun.com - it has the full details on using web.xml
Bill
------------------
author of:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!