Hi,

>There lies the problem i don't know which servlets i would get, and i
don't
>want to reconfigure the web.xml and restart the server every time
something
>changes or get added.

That's the standard practice.

>Could you describe your second point a little closer, please?

If you map a servlet to url-pattern /x, you would use "/x" as the
parameter to the call to get a RequestDispatcher object.

>We are using a database to store the mapping of urls to servlets.

That's not a standard practice, and it's also a lower performance design
than the container mapping.

>I think web.xml would be pretty confusing if I register all my 200
Servlets
>in it.

200 servlets is a lot, and your web.xml would be log.  You can use XML
entities to break it up if you'd like.

Another option you have is to enable the invoker servlet that ships with
tomcat, but is disabled by default.  That servlet serves URLs like
/servlet/com.foo.bar.  So you would be able to call a request dispatcher
for /servlet/com.foo.bar and you won't have to define anything in
web.xml.  The invoker servlet may present a security risk (which is why
it's disabled by default) and is not guaranteed to be portable, i.e.
other servlet containers may not have such a feature.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to