问题
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!
回答1:
You should define a servlet-mapping in the web.xml like this:
Then add the url-pattern to the server root URL:
回答2:
Set it to your servlet mapping.
IMO opening new browser window every time you start the server is a PITA.
来源:https://stackoverflow.com/questions/9151460/intellij-idea-deploy-a-simple-java-servlet-no-jsp-to-tomcat-7