tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Doe" <>
Subject How does the deploy descriptor work?
Date Fri, 23 Jul 2004 20:10:36 GMT
I thought I understood this, but clearly I don't! (Or at least my app 
doesn't work.) So, if I may, I would like to explain my understanding of how 
you create the deploy descriptor, and how it works in Tomcat. Just to get 
some clarity.

OK, so I have a website, hosted as the context /mywebsite in Tomcat. So the 
localhost syntax to the root of this application is:


Now as I understand it, to get this URL to execute a servlet called Index 
(ie the class WEB-INF\classes\com\mywebsite\Index.class -- assumes Windows) 
I need to add this to the deployment descriptor:


That is straight forward. Now what if I want /Login, /Register, /Catalogue, 
etc? What is the url-pattern for these? If I enter /Login, for example, will 
this the call that servlet when I use this URL:


If not, and I have to use a url-pattern of /mywebsite/Login, what happens if 
I decide to change the context path, or even to host it as a virtual server? 
Do I have to re-edit the web.xml file to reflect these changes?

One final question. If the url-pattern for Login is 
/mywebsite/Login.something, does this mean the user has to type:


for this to trigger? In short, is it the URL that is all important, and not 
the underlying filenames? (God knows how the wildcards work, so I've been 
trying to use 'full paths' as I thought this was easier. But I get no output 
even though I have lines writing to the ServletConfig log, to standard out 
and to the PrintWriter output!)

If anyone can comment on the above -- such as it is totally accurate, or it 
is all rubbish -- that would be useful!


STOP MORE SPAM with the new MSN 8 and get 2 months FREE*

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message