Issue
I want to run my webApp with two differenc URL-paths like: localhost:8080/firstURL localhost:8080/secURL
FirstURL and secURL should display the same start view. What should I impleneted that by using ?
<module-name>firstURL</module-name>
<display-name>name</display-name>
Solution
You could do the following in your web.xml
:
<servlet-mapping>
<servlet-name>myServlet</servlet-name>
<url-pattern>/foo</url-pattern>
<url-pattern>/bar</url-pattern>
</servlet-mapping>
With annotations, you would have:
@WebServlet({"/foo", "/bar"})
public class MyServlet extends HttpServlet {
...
}
Answered By - cassiomolin