rf wrote:
It is strange that RequestDispatcher considers only
jsp and html, why not other extns like jpg/gif or why
not just any other resource - is this because of any
security concern?
I don't think it's security, but I looked at the Servlet spec (page 55) and couldn't find a specific reason. It looks like it was originally intended that a RequestDispatcher should represent only a servlet, and that you could forward to that servlet to continue processing the request, but there is also the include method of RequestDispatcher for when you wish to output /some/ data and then allow the included resource to continue processing.

Perhaps the very fact that HTML files are allowed to be the target resources of RequestDispatchers at all was added on at some later point for developer convenience. Certainly there is more [programmatic] flexibility if you are forwarding to or including a servlet (or JSP, which is really a servlet).


Erik



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to