tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Koval <ko...@donapex.net>
Subject refering to default content handler
Date Thu, 05 Aug 2004 13:44:32 GMT
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


Mime
View raw message