Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/308.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java jsp无需重新启动服务器_Java_Maven_Tomcat_Intellij Idea - Fatal编程技术网

Java jsp无需重新启动服务器

Java jsp无需重新启动服务器,java,maven,tomcat,intellij-idea,Java,Maven,Tomcat,Intellij Idea,我是一名前端web开发人员,有一个Java项目,我的任务是开发前端.jsp文件(html/css/js) 我已在IntelliJ community edition 15中设置了该项目,并使用Maven运行良好: mvn -Denv=local tomcat7:run-war 编译只需要1分30秒,而仅仅为了看到一个简单的CSS/HTML更改而等待那么长时间是令人沮丧的 我被告知IntelliJ可以设置它,这样我就可以编辑.jsp文件,并在不重新启动tomcat的情况下动态查看更改 但是怎么做

我是一名前端web开发人员,有一个Java项目,我的任务是开发前端.jsp文件(html/css/js)

我已在IntelliJ community edition 15中设置了该项目,并使用Maven运行良好:

mvn -Denv=local tomcat7:run-war
编译只需要1分30秒,而仅仅为了看到一个简单的CSS/HTML更改而等待那么长时间是令人沮丧的

我被告知IntelliJ可以设置它,这样我就可以编辑.jsp文件,并在不重新启动tomcat的情况下动态查看更改

但是怎么做呢?(你可能已经猜到了,我对Java/Maven/Tomcat知之甚少)

我在IntelliJ中看到了一个Maven窗口,如下所示:

还有一个POM文件:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.xxxx</groupId>
    <artifactId>hermes</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>war</packaging>
    <name>hermes</name>

    <properties>
        <java.version>1.6</java.version>
        <hibernate.version>5.0.3.Final</hibernate.version>
        <org.springframework.version>4.2.1.RELEASE</org.springframework.version>
        <org.springframework.security.version>4.0.3.RELEASE</org.springframework.security.version>
        <org.springframework.amqp.version>1.3.5.RELEASE</org.springframework.amqp.version>
        <jackson.version>2.5.0</jackson.version>
        <google.simple.spring.memcached.version>3.6.0</google.simple.spring.memcached.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.quartz-scheduler</groupId>
            <artifactId>quartz</artifactId>
            <version>2.2.1</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.mail</groupId>
                    <artifactId>mail</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jdmk</groupId>
                    <artifactId>jmxtools</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jmx</groupId>
                    <artifactId>jmxri</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jms</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.34</version>
        </dependency>
        <!-- Spring Security -->
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-web</artifactId>
            <version>${org.springframework.security.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-config</artifactId>
            <version>${org.springframework.security.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-ldap</artifactId>
            <version>${org.springframework.security.version}</version>
        </dependency>


        <!-- Hibernate -->
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>${hibernate.version}</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>${hibernate.version}</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>${hibernate.version}</version>
        </dependency>

        <!-- jsr303 validation -->
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <version>1.1.0.Final</version>
        </dependency>
        <dependency>
            <groupId>jstl</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>

        <dependency>
            <groupId>com.google.code.simple-spring-memcached</groupId>
            <artifactId>spring-cache</artifactId>
            <version>${google.simple.spring.memcached.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-aop</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-asm</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.google.code.simple-spring-memcached</groupId>
            <artifactId>spymemcached-provider</artifactId>
            <version>${google.simple.spring.memcached.version}</version>
        </dependency>
        <dependency>
            <groupId>com.rometools</groupId>
            <artifactId>rome</artifactId>
            <version>1.5.0</version>
        </dependency>
        <dependency>
            <groupId>org.jdom</groupId>
            <artifactId>jdom2</artifactId>
            <version>2.0.5</version>
        </dependency>
        <dependency>
            <groupId>org.jsoup</groupId>
            <artifactId>jsoup</artifactId>
            <version>1.8.2</version>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.3</version>
        </dependency>
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <version>1</version>
        </dependency>
        <dependency>
            <groupId>commons-dbcp</groupId>
            <artifactId>commons-dbcp</artifactId>
            <version>1.4</version>
            <optional>false</optional>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>dbcore-utils</groupId>
            <artifactId>jdbc-driver-oracle11g</artifactId>
            <version>1.6.0</version>
        </dependency>
        <dependency>
            <groupId>com.github.kevinsawicki</groupId>
            <artifactId>http-request</artifactId>
            <version>6.0</version>
        </dependency>

        <!-- Rabbit/JMS/AMQP -->
        <dependency>
            <groupId>javax.jms</groupId>
            <artifactId>javax.jms-api</artifactId>
            <version>2.0</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.amqp</groupId>
            <artifactId>spring-rabbit</artifactId>
            <version>${org.springframework.amqp.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.amqp</groupId>
            <artifactId>spring-amqp</artifactId>
            <version>${org.springframework.amqp.version}</version>
        </dependency>
        <dependency>
            <groupId>com.rabbitmq</groupId>
            <artifactId>amqp-client</artifactId>
            <version>3.3.4</version>
        </dependency>

        <dependency>
            <groupId>com.xxxx</groupId>
            <artifactId>atlas</artifactId>
            <version>1.0.1-RELEASE</version>
            <exclusions>
                <!-- Exclude Commons Logging in favor of SLF4j -->
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-jms</artifactId>
                </exclusion>
            </exclusions>
        </dependency>


    </dependencies>

    <repositories>
        <repository>
            <id>maven.xxxx.net</id>
            <url>http://maven.xxxx.net:8080/artifactory/libs-releases-local/</url>
        </repository>
        <repository>
            <id>spring libs milestones</id>
            <url>http://repo.springsource.org/libs-milestone/</url>
        </repository>
        <repository>
            <id>EclipseLink</id>
            <url>http://download.eclipse.org/rt/eclipselink/maven.repo</url>
        </repository>
        <repository>
            <id>Couchbase</id>
            <url>http://files.couchbase.com/maven2/</url>
        </repository>
        <repository>
            <id>Java.net</id>
            <url>http://download.java.net/maven/2/</url>
        </repository>
        <repository>
            <id>mavenrepository.com</id>
            <url>repo1.maven.org/maven2/</url>
        </repository>
        <repository>
            <id>com.springsource.repository.bundles.milestone</id>
            <name>SpringSource Enterprise Bundle Repository - SpringSource Milestone Releases</name>
            <url>http://repository.springsource.com/maven/bundles/milestone</url>
        </repository>
        <repository>
            <id>com.springsource.repository.bundles.external</id>
            <name>SpringSource Enterprise Bundle Repository - External Releases</name>
            <url>http://repository.springsource.com/maven/bundles/external</url>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <id>central</id>
            <name>plugins-releases</name>
            <url>http://maven.xxxx.net:8080/artifactory/plugins-releases</url>
        </pluginRepository>
        <pluginRepository>
            <snapshots />
            <id>snapshots</id>
            <name>plugins-snapshots</name>
            <url>http://maven.xxxx.net:8080/artifactory/plugins-snapshots</url>
        </pluginRepository>
    </pluginRepositories>
    <build>
        <finalName>hermes</finalName>
        <plugins>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${basedir}/target/classes</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/java</directory>
                                    <filtering>true</filtering>
                                </resource>
                                <resource>
                                    <directory>src/main/resources/spring</directory>
                                    <targetPath>META-INF</targetPath>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-eclipse-plugin</artifactId>
                <version>2.9</version>
                <configuration>
                    <additionalProjectnatures>
                        <projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
                    </additionalProjectnatures>
                    <additionalBuildcommands>
                        <buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
                    </additionalBuildcommands>
                    <downloadSources>true</downloadSources>
                    <downloadJavadocs>true</downloadJavadocs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <compilerArgument>-Xlint:all</compilerArgument>
                    <showWarnings>true</showWarnings>
                    <showDeprecation>true</showDeprecation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>2.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <filters>
                                <filter>
                                    <artifact>*:*</artifact>
                                    <excludes>
                                        <exclude>META-INF/*.SF</exclude>
                                        <exclude>META-INF/*.DSA</exclude>
                                        <exclude>META-INF/*.RSA</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                            <transformers>
                                <transformer
                                    implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                    <mainClass>com.xxxx.hermes.app.Hermes</mainClass>
                                </transformer>
                                <transformer
                                    implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
                                    <resources>
                                        <resource>.java</resource>
                                    </resources>
                                </transformer>
                            </transformers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- Useful for purging local repository and re-downloading all dependencies 
                in event of major/minor version conflicts -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.8</version>
            </plugin>
            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <port>8891</port>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <packagingExcludes>
                        WEB-INF/classes/com/xxxx/**/*.java,WEB-INF/lib/servlet*.jar
                    </packagingExcludes>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

4.0.0
com.xxxx
爱马仕
0.0.1-快照
战争
爱马仕
1.6
5.0.3.4最终版本
4.2.1.1发布
4.0.3.1发布
1.3.5.1发布
2.5.0
3.6.0
org.quartz-scheduler
石英
2.2.1
log4j
log4j
1.2.17
javax.mail
邮件
com.sun.jdmk
jmxtools
com.sun.jmx
jmxri
org.springframework
SpringJDBC
${org.springframework.version}
org.springframework
spring上下文支持
${org.springframework.version}
org.springframework
SpringJMS
${org.springframework.version}
org.springframework
春季甲虫
${org.springframework.version}
mysql
mysql连接器java
5.1.34
org.springframework.security
spring安全网
${org.springframework.security.version}
org.springframework.security
spring安全配置
${org.springframework.security.version}
org.springframework.security
spring安全ldap
${org.springframework.security.version}
org.hibernate
冬眠核心
${hibernate.version}
org.hibernate
休眠实体管理器
${hibernate.version}
org.hibernate
休眠验证器
${hibernate.version}
javax.validation
验证api
1.1.0.1最终版本
jstl
jstl
1.2
com.google.code.simple-spring-memcached
弹簧缓存
${google.simple.spring.memcached.version}
org.springframework
春季aop
org.springframework
春季asm
com.google.code.simple-spring-memcached
间谍缓存提供程序
${google.simple.spring.memcached.version}
com.rometools
罗马
1.5.0
org.jdom
jdom2
2.0.5
org.jsoup
jsoup
1.8.2
公地郎
公地郎
2.3
javax.inject
javax.inject
1.
公共dbcp
公共dbcp
1.4
假的
com.fasterxml.jackson.core
杰克逊数据绑定
${jackson.version}
com.fasterxml.jackson.core
杰克逊核心
${jackson.version}
dbcore-utils
jdbc-driver-oracle11g
1.6.0
com.github.kevinsawicki
http请求
6
javax.jms
javax.jms-api
2
org.springframework.amqp
春兔
${org.springframework.amqp.version}
org.springframework.amqp
春季amqp
${org.springframework.amqp.version}
com.rabbitmq
amqp客户端
3.3.4
com.xxxx
地图集
1.0.1-发布
org.springframework
SpringJMS
maven.xxxx.net
http://maven.xxxx.net:8080/artifactory/libs-本地发布/
SpringLibs里程碑
http://repo.springsource.org/libs-milestone/
日食
http://download.eclipse.org/rt/eclipselink/maven.repo
卧铺
http://files.couchbase.com/maven2/
Java.net
http://download.java.net/maven/2/
mavenrepository.com
repo1.maven.org/maven2/
com.springsource.repository.bundles.millestone
SpringSource企业包存储库-SpringSource里程碑版本
http://repository.springsource.com/maven/bundles/milestone
com.springsource.repository.bundles.external
tomcat7:run
 <dependency>
     <groupId>javax.servlet</groupId>
     <artifactId>servlet-api</artifactId>
     <version>2.5</version>
     <scope>provided</scope>
 </dependency>