When using eclipse to check the operation of a dynamic file, it only works on that terminal. So, check the operation using jetty. And personally, the directory structure of the maven project in eclipse is different and it is troublesome.
Add the following plugins.
<plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>maven-jetty-plugin</artifactId> <version>6.1.10</version> <configuration> <scanIntervalSecounds>10</scanIntervalSecounds> <connectors> <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"> <port>8080</port> <maxIdleTime>60000</maxIdleTime> </connector> </connectors> </configuration> </plugin>
Execute the following from the command line.
Connect to localhost.
Sometimes jetty didn’t work. It took time to determine whether pom.xml was bad, the terminal was bad, or the plugin was bad. As a result, it is better to set up a container for the build and check it each time, and there is no dependency problem, so I think it is good.