can we use sendRedirect() of HttpServletResponse to redirect to servlet or
it is for only to redirect to html or jsp files.
It can be used to redirect to any resource that is defined in the WEB.xml.
a) When you specify a JSP , web container will directly get that resource.
b) If you specify a URL
pattern then web container will use web.xml to decode the url pattern to a servlet or a JSP file [In case there is a servlet mapping with jsp-file].
Try these out , they are quite interesting.
Have a look at ServletContext.getNamedDispatcher() as well