hot deploying simple application in jetty

后端 未结 2 1507
萌比男神i
萌比男神i 2021-01-16 15:15

I am working with jetty hightide vesion 7 currently as a stand alone server. I have a simple web project with a couple of jsp\'s and backing classes that I am currently depl

相关标签:
2条回答
  • 2021-01-16 15:39

    If you want to use jetty maven plugin

       <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>maven-jetty-plugin</artifactId>
            <version>6.1.25</version>
            <configuration>
                <scanIntervalSeconds>10</scanIntervalSeconds>
                <requestLog implementation="org.mortbay.jetty.NCSARequestLog">
                    <!--
                              This doesn't do anything for Jetty, but is a workaround for a
                              Maven bug that prevents the requestLog from being set.
                          -->
                    <append>true</append>
                </requestLog>
                <webApp>${basedir}/out/war/Spring2_5_6_war.war</webApp>
            </configuration>
        </plugin>
    
    0 讨论(0)
  • 2021-01-16 15:50

    You need to define a ContextDeployer with a non-zero scan interval:

    <Call name="addLifeCycle">
      <Arg>
        <New class="org.mortbay.jetty.deployer.ContextDeployer">
          <Set name="contexts"><Ref id="Contexts"/></Set>
          <Set name="configurationDir"><SystemProperty name="jetty.home" default="."/>/contexts</Set>
          <Set name="scanInterval">1</Set>
        </New>
      </Arg>
    </Call>
    

    Regarding debugging, I guess that what you have in mind is to connect a remote debugger using JPDA. For this, you'll need to set the -agentlib:jdwp option1:

    -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
    

    The configure your IDE debugger to connect on the specified port.

    1 if the target VM is 5.0 or newer, -agentlib:jdwp is preferable over the -Xdebug and -Xrunjdwp options which are still supported though.

    0 讨论(0)
提交回复
热议问题