标头中的缓存控制不会反映在jetty服务器上

时间:2015-04-10 08:57:35

标签: java maven http-headers jetty

我已将cache-control:no-cache, no-store设置为cache-control:no-store, no-cache, must-revalidate,但是,每次运行mvn clean installmvn jetty:run时,此修改都不会反映到应用程序中,而是仍显示旧配置。任何人都知道如何解决这个问题?

    <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <configuration>
            <!--<webAppConfig>-->
            <!--<contextPath>${context.root}</contextPath>-->
            <!--<jettyEnvXml>${project.build.directory}/test-classes/jetty/jetty-env.xml</jettyEnvXml>-->
            <!--</webAppConfig>-->
            <webApp>
                <descriptor>${project.build.directory}/webapp/WEB-INF/web.xml</descriptor>
                <contextPath>${context.root}</contextPath>
                <jettyEnvXml>${project.build.directory}/test-classes/jetty/jetty-env.xml</jettyEnvXml>
            </webApp>
            <connectors>
                <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
                    <port>${jetty.http.port}</port>
                    <maxIdleTime>3600000</maxIdleTime>
                </connector>
                <connector implementation="org.eclipse.jetty.server.ssl.SslSocketConnector">
                    <port>${jetty.https.port}</port>
                    <maxIdleTime>3600000</maxIdleTime>
                    <keystore>${project.build.directory}/test-classes/keystore</keystore>
                    <password>wicket</password>
                    <keyPassword>wicket</keyPassword>
                </connector>
            </connectors>
            <stopPort>8081</stopPort>
            <stopKey>shutdown</stopKey>
        </configuration>
        <dependencies>
            <dependency>
                <groupId>org.apache.activemq</groupId>
                <artifactId>activemq-core</artifactId>
                <version>5.6.0</version>
                <scope>runtime</scope>
                <exclusions>
                    <exclusion>
                        <groupId>org.mortbay.jetty</groupId>
                        <artifactId>jetty</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.mortbay.jetty</groupId>
                        <artifactId>jetty-util</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.mortbay.jetty</groupId>
                        <artifactId>jsp-api-2.1</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.mortbay.jetty</groupId>
                        <artifactId>jsp-2.1</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.mortbay.jetty</groupId>
                        <artifactId>servlet-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <!-- Dependencies provided by WLS -->
            <dependency>
                <groupId>stax</groupId>
                <artifactId>stax-api</artifactId>
                <version>1.0.1</version>
            </dependency>
            <dependency>
                <groupId>javax.xml.bind</groupId>
                <artifactId>jaxb-api</artifactId>
                <version>2.2.1</version>
            </dependency>
            <dependency>
                <groupId>com.sun.xml.bind</groupId>
                <artifactId>jaxb-impl</artifactId>
                <version>2.2.1.1</version>
            </dependency>
            <dependency>
                <groupId>javax.activation</groupId>
                <artifactId>activation</artifactId>
                <version>1.1</version>
            </dependency>
            <dependency>
                <groupId>javax.xml.soap</groupId>
                <artifactId>saaj-api</artifactId>
                <version>1.3.1</version>
            </dependency>
            <dependency>
                <groupId>com.sun.xml.messaging.saaj</groupId>
                <artifactId>saaj-impl</artifactId>
                <version>1.3.4</version>
            </dependency>

        </dependencies>
    </plugin>
    <plugin>

0 个答案:

没有答案