Reputation: 421
I build a UI using JSP for my servlets to get input data from users. Everytime I want to see the UI and how the Servlets are performing I have to do all thses steps over and over again,
war
file by mvn clean install
I want to know if there is a command that i can use to rerun apache tomcat with the war
file im building at once, So that i only have to refresh the webpage to see the result. Or any method that is easier than above.
I use Intellij Idea.
Thanks in advance.
Upvotes: 0
Views: 580
Reputation: 1475
IntelliJ IDEA Community Edition does not support J2EE, but you can also achieve this in the following two ways. For full support of tomcat, you can buy IntelliJ IDEA Enterpries Edition.
Use maven-compiler-plugin
1) Add this plugin to your pom.xml
:
<build>
<finalName>mvn-webapp</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
</plugin>
</plugins>
</build>
2) Then run this command:
mvn tomcat:run
Or Install Tomcat Runner Plugin
Refer to this link for usage of this plugin.
Upvotes: 1