There are some Maven plugins that are full Servlet
containers. We'll look at an example: the Jetty plugin, and we'll see how it
makes developing web applications easier.
Open pom.xml
<build>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groudId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.10</version>
<configuration>
<scanIntervalSeconds>5</scanIntervalSeconds>
-> It checks for every 5 sec either any change in jsp or class files.
</configuration>
</plugin>
</plugins>
</build>
Now run
below command
mvn
jetty:run -> First maven download the plugin and then run
http://localhost:8080/mywebapp ->
access this browser you will see “Hello World”
No comments:
Post a Comment