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: refering to default content handler
Date Thu, 05 Aug 2004 13:52:46 GMT

Hi,
See conf/web.xml for the DefaultServlet declaration.  Map it however you
want using however many <servlet-mapping> elements you want.

Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: Dmitry Koval [mailto:koval@donapex.net]
>Sent: Thursday, August 05, 2004 9:45 AM
>To: tomcat-user@jakarta.apache.org
>Subject: refering to default content handler
>
>Hi.
>
>In my configuration I have a servlet that is default handler for all my
>content.
>It declared in web.xml as follows:
>
><servlet-mapping>
>	<servlet-name>controller</servlet-name>
>        <url-pattern>/</url-pattern>
></servlet-mapping>
>
>In this case my controller is responsible for all the requests.
>The problem appears when client need to load an image. I have to read a
>file and send it to client in my servlet.
>And that way with all static data. I have to find what the file type
is,
>find appropriate mime mapping then read it and so on.
>I actually don't like this approach because I think delegating this
task
>to default tomcat handler makes more sense.
>
>May I write something like this in addition to my config? :
><servlet-mapping>
>	<servlet-name>org.apache.defaultContentHandler</servlet-name>
>        <url-pattern>/images</url-pattern>
></servlet-mapping>
>
>So I'd like have everything handled by my controller except /images
>handled by default tomcat handler.
>
>Or maybe there's some other elegant solution?
>
>Please cc to me, cause I'm not subscribed to a list.
>Thanks for attention.
>
>
>---------------------------------------------------------------------
>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