Vlad
Vlad

Reputation: 618

IntelliJ Idea: Deploy a simple Java servlet (no JSP) to Tomcat 7

I tried following the tutorial here to deploy a servlet but that only works if you specify a JSP file. The problem is that without the JSP, I don't know what to set the Startup Page in the Tomcat Run/Debug configuration. So any idea what to do?

Thanks!

Upvotes: 12

Views: 24572

Answers (2)

CrazyCoder
CrazyCoder

Reputation: 401975

You should define a servlet-mapping in the web.xml like this:

URL pattern

Then add the url-pattern to the server root URL:

URL to open

Upvotes: 16

Dave Newton
Dave Newton

Reputation: 160191

Set it to your servlet mapping.

IMO opening new browser window every time you start the server is a PITA.

Upvotes: 1

Related Questions