You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dmitry Koval <ko...@donapex.net> on 2004/08/05 15:44:32 UTC
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