You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mark Claassen <ma...@donnell.com> on 2005/01/05 14:35:34 UTC
webapp context confusion
I have been using Tomcat for quite some time now, and am still a bit shakey
on some of the configuration details. I am currently using Tomcat5 and I
want to my servlet to process all .jar and .jnlp files.
I have my servlet mapping set up in the web.xml:
<servlet-mapping>
<servlet-name>MyServlet</servlet-name>
<url-pattern>*.jar</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>MyServlet</servlet-name>
<url-pattern>*.jnlp</url-pattern>
</servlet-mapping>
My problem is that I want this to process all files, not just those in
MySerlvet/
I cannot make a context element in the
CATALINA_HOME/conf/[..]/[..]/MyServlet.xml that sets the path to be "/",
since the default servlet already has this context.
How can I bundle this up as a webapp and still have it process .jnlp and
.jar files in all directories?
Thanks,
Mark
Confidentiality Notice: OCIESERVICE
---------------------------------------------------------------------
The contents of this e-mail message and any attachments are intended
solely for the addressee(s) named in this message. This communication
is intended to be and to remain confidential. If you are not the
intended recipient of this message, or if this message has been
addressed to you in error, please immediately alert the sender by
reply e-mail and then delete this message and its attachments. Do not
deliver, distribute, copy, disclose the contents or take any action
in reliance upon the information contained in the communication or
any attachments.
---------------------
Mark Claassen
Donnell Systems, Inc.
300 S. St. Louis Blvd. Ste. 203
South Bend, IN 46617
E-mail: mailto:mark.claassen@donnell.com
Voice: (574)232-3784
Fax: (574)232-4014
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: webapp context confusion
Posted by QM <qm...@brandxdev.net>.
On Wed, Jan 05, 2005 at 08:35:34AM -0500, Mark Claassen wrote:
: I am currently using Tomcat5 and I
: want to my servlet to process all .jar and .jnlp files.
: [snip]
: My problem is that I want this to process all files, not just those in
: MySerlvet/
: [snip]
: How can I bundle this up as a webapp and still have it process .jnlp and
: .jar files in all directories?
Your web.xml excerpt looks fine at first glance. Why not post the
entire thing?
By "in all directories," do you mean for *all* webapps? You could make
a servlet entry in the global web.xml (this is how Tomcat "magically"
knows to process your *.jsp files), but that's not portable...
-QM
--
software -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org