jQuery in Action, 3rd edition
The moose likes Servlets and the fly likes Alias of a servlet ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Alias of a servlet ?" Watch "Alias of a servlet ?" New topic

Alias of a servlet ?

Vishakha Ahuja
Ranch Hand

Joined: Sep 13, 2000
Posts: 191
Hello, I read that a server knows a servlet by the alias name.
On Allaire Jrun, How do I define alias for the servlet: Specifically,
1)If my servlet class file (Eg. HelloServlet.class) resides in this directory
c:\Program Files\Allaire\JRun\servers\default\default-app\web-inf\classes, then what should be my fully qualified servlet class name ? can servlet name and display name be the same ?
2)What should be my address in the web-browser for running this alias servlet ?
Currently, I run it with this address:
I can run with class name, but just don't know how to refer it with an alias name ?
Please help.
Kiran Kumar
Ranch Hand

Joined: May 18, 2001
Posts: 107
in the def-app directory there is a web.xml file which u have to edit to access ur servlet. like the following
servlet-name snoop
description snoop servlet
servlet-class SnoopServlet
servlet-name snoop
url-pattern /servlet/snoop2/*

Thanks<br /> <br />Kiran <br /> <br />SCEA, SCJP 1.4,<br /> <br />"First they ignore u, then they laugh at u, then they fight u, <br />then u will win<br /> <br />Mahatma Gandhi"
Vishakha Ahuja
Ranch Hand

Joined: Sep 13, 2000
Posts: 191
Thanks for the reply.
However JRun gives a GUI to make these changes and they are autimatically reflected in the xml.
I tried changing this xml file, and my default-server wouldn't start "error: exited abnormally, check event log file"
When I restored the xml to its original state, server started alright. Now, I'm back to square one.
I agree. Here's the link: http://aspose.com/file-tools
subject: Alias of a servlet ?
It's not a secret anymore!