tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Programmatically assign servlet mappings
Date Wed, 08 Sep 2004 19:03:47 GMT

Hi,
There's no portable way to do this.  I've posted example code for this
to the list numerous times.  Navigate the Tomcat container hierarchy
down to the context you want, create and add your servlet wrapper
instance, and call StandardContext#addServletMapping.

Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: SH Solutions [mailto:sh-solutions@gmx.net]
>Sent: Wednesday, September 08, 2004 2:58 PM
>To: 'Tomcat Users List'
>Subject: Programmatically assign servlet mappings
>
>Hello
>
>I want to archive the following:
>
>I want to start my application using some ContextListener.
>Then my application shall register the required servlet-mappings.
>In my web.xml I do NOT want to have any servlet-mappings at all.
>
>The reason for this is, that my cms system serves different content
types
>with different servlets. One servlet per type. Additionally every
servlet
>is
>a module, managed by my cms system.
>Basically this means, that I do not know, which modules and hence,
which
>servlets need to be mapped, if any.
>
>Is there a way to do this?
>I assume yes, because embedded tomcat need such things too, I think.
>
>Additionally, is there a way to do this container independent - is
there a
>servlet-api way to do it?
>
>Regards,
>  Steffen
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message