views:

42

answers:

1

I've written the code for a servlet to serve images in my app from a url such as:

/imgsrv?imgid=12345

So this would be one additional servlet in the app besides the Dispatcher servlet.

The problem is, I don't know how do you configure Spring to call this new servlet from the Dispatcher servlet?

+1  A: 

Can you make it clear that why you should call the new servlet from the Dispatcher servlet, what not just add a new servlet?

khotyn
I thought every resource has to be called from the dispatcher in Spring. Won't the url '/imgsrv' be seen by Dispatcher first?
cafe
I'm not sure that i got what you mean. A dispatcher servlet is a servlet, so you can configure a servlet-mapping for the dispatcher in web.xml to let it handle the specific url and bypass the urls you don't want it to handle.
khotyn