Previous we wrote Servlets and jsp:http://www.cnblogs.com/lay2017/p/8468519.html in a maven-built Java Web project
In this article, we're going to let this simple project run in Tomcat.
- Click Run, Edit configurations on the toolbar ...
- Click the upper left corner + sign, select Tomcat Server, local
- Enter Tomcat's name
- Click Configure, configure your local tomcat, and select the Tomcat
- Switch to the Deployment tab, click the Right + button, select Artifact, pop up the selection box
- Choose ... exploded
- Click OK or enter, so we've configured it.
- Back to the project interface, click the Debug button in the top right corner or the Run button to launch and deploy the Web App
- Enter Localhost:8080/hello in the browser
The results are as follows:
Note: If the community version of idea is not provided with integrated Tomcat, then you need to do some MAVEN configuration to support the Tomcat plugin to run
<plugin> <groupId>Org.apache.tomcat.maven</groupId> <Artifactid>Tomcat7-maven-plugin</Artifactid> <version>2.2</version> <Configuration> <Path>/${project.artifactid}</Path> </Configuration> </plugin>
However, the plugin does not implement hot deployment of Java files, nor can you set breakpoints debugging
Get your web App up and running