java - Map to servlet without servlet-mapping record -
this question has answer here:
i'm developing frontservlet, there no need map other servlet. use getrequestdispatcher
specific servlet , need name access it, forward request, without mapping's url-pattern
don't know how it.
is there ability access servlet without being mapped in web.xml?
you should have servlet mapped name in order invoke programmatically, , can done:
- either old way
<servlet-mapping>...</servlet-mapping>
tag in deployment descriptor file. - with 3.0 servlet spec annotation
@webservlet
- using
addservlet
method.
then able chain request custom servlet.
Comments
Post a Comment