문제

We've been experiencing problems with jsessionid and I'm trying to figure out a way to disable this. Would anybody happen to know how you can do this using the org.mortbay.jetty:jetty-maven-plugin:7.x.x? So far, all I've come across are ways to do it using the old plugin from Mortbay whose settings are incompatible with Eclipse's version.

Thanks in advance,

Martin

도움이 되었습니까?

해결책

Submitting answer to my own question due to the fact that nobody seems to have an answer for this and I am sure someone else will eventually find it useful as well, because all the other examples of how to do this were for the old maven-jetty-plugin (<7.x).

After digging through Jetty's code for a while, I found out that the variable had been renamed as shown below:

<build>
    <plugins>
        <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
            <version>${version.jetty}</version>
            <configuration>
                <webAppConfig>
                    <contextPath>/foo</contextPath>

                    <sessionHandler implementation="org.eclipse.jetty.server.session.SessionHandler">
                        <sessionManager implementation="org.eclipse.jetty.server.session.HashSessionManager">
                            <!-- Disable url sessions using JSessionID -->
                            <sessionIdPathParameterName>none</sessionIdPathParameterName>
                        </sessionManager>
                    </sessionHandler>
                </webAppConfig>
            </configuration>
        </plugin>

    <plugins>

</build>

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top