Can we combine Maven project(APIs with @Path) and Webservlets with JSP and JS in a single project

Viewed 18

Can we create a single project in Intellij (Ultimate edition) with below requirements ?

  1. With JSP, Javascript and Webservlets and
  2. With few classes that has endpoints (APIs) annotated with @Path using javax.ws.rs

So that, single project should handle below scenarios:

  1. http://example.com/login.jsp - Should hit JSP -> JS -> Webservlet
  2. http://example.com/poc/createUser - Should make API call to the class annotated with @Path.

How should we configure pom.xml and web.xml (to route the requests) ? Any suggestions is appreciated.

0 Answers
Related