[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jetty-users] Migrating to Jetty 9
|
Ok, at the risk of asking a really dumb question, I'm trying to understand relationship between a WebAppContext xml block like:
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="contextPath">/wiki</Set>
<Set name="war">/opt/myapp/myapp.war</Set>
</Configure>
and a server configure xml like:
<Configure class="org.eclipse.jetty.server.Server">
...
</Configure>
Regards,
____________________________
Marty Stich
RF Code, Inc
9229 Waterford Centre Blvd.
Suite 500
Austin, TX 78758
Office: 512.439.2236
________________________________________
From: jetty-users-bounces@xxxxxxxxxxx [jetty-users-bounces@xxxxxxxxxxx] on behalf of Jesse McConnell [jesse.mcconnell@xxxxxxxxx]
Sent: Monday, April 08, 2013 2:53 PM
To: JETTY user mailing list
Subject: Re: [jetty-users] Migrating to Jetty 9
That is because the ContextProvider no longer exists.
This might help.
http://www.eclipse.org/jetty/documentation/current/configuring-specific-webapp-deployment.html
Or just look in the etc/jetty-* file that initializes the deployer.
cheers,
jesse
--
jesse mcconnell
jesse.mcconnell@xxxxxxxxx<mailto:jesse.mcconnell@xxxxxxxxx>
On Mon, Apr 8, 2013 at 2:50 PM, Marty Stich <mstich@xxxxxxxxxx<mailto:mstich@xxxxxxxxxx>> wrote:
I started with the jetty.xml you referenced and then tried to add in a block to configure my context. I used the following:
<Call name="addLifeCycle">
<Arg>
<New class="org.eclipse.jetty.deploy.providers.ContextProvider">
<Set name="contexts"><Ref refid="Contexts"/></Set>
<Set name="configurationDir"><SystemProperty name="jetty.home" default="."/>/contexts</Set>
<Set name="scanInterval">0</Set>
</New>
</Arg>
</Call>
When I did, I get another ClassNotFoundException this time on ContextProvider.
____________________________
Marty Stich
RF Code, Inc
9229 Waterford Centre Blvd.
Suite 500
Austin, TX 78758
Office: 512.439.2236<tel:512.439.2236>
________________________________________
From: jetty-users-bounces@xxxxxxxxxxx<mailto:jetty-users-bounces@xxxxxxxxxxx> [jetty-users-bounces@xxxxxxxxxxx<mailto:jetty-users-bounces@xxxxxxxxxxx>] on behalf of Jesse McConnell [jesse.mcconnell@xxxxxxxxx<mailto:jesse.mcconnell@xxxxxxxxx>]
Sent: Monday, April 08, 2013 1:15 PM
To: JETTY user mailing list
Subject: Re: [jetty-users] Migrating to Jetty 9
I would start with the jetty.xml from jetty-9 under jetty.home/etc/jetty.xml
I don't see anything in your old documentation that indicates you were servering content for different webapps on different connectors...but in jetty-9 documentation that is not yet updated.
http://www.eclipse.org/jetty/documentation/current/serving-webapp-from-particular-port.html
updating that page is on our list of todo's...as can be evidenced from our large RED banner across the top...
but again, I don't see anything in your jetty-6 jetty.xml that indicates you need that functionality.
cheers,
jesse
--
jesse mcconnell
jesse.mcconnell@xxxxxxxxx<mailto:jesse.mcconnell@xxxxxxxxx><mailto:jesse.mcconnell@xxxxxxxxx<mailto:jesse.mcconnell@xxxxxxxxx>>
On Mon, Apr 8, 2013 at 12:53 PM, Marty Stich <mstich@xxxxxxxxxx<mailto:mstich@xxxxxxxxxx><mailto:mstich@xxxxxxxxxx<mailto:mstich@xxxxxxxxxx>>> wrote:
I believe the problem I'm having right now is configuring the context/context path. I tried modifying a configuration I took directly from the online documentation, specifically:
<Configure id="ServerA" class="org.eclipse.jetty.server.Server">
<!-- set up the port for ServerA -->
<Set name="connectors">
<Array type="org.eclipse.jetty.server.Connector">
<Item>
<New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
<Set name="port">8080</Set>
<Set name="maxIdleTime">30000</Set>
<Set name="Acceptors">10</Set>
</New>
</Item>
</Array>
</Set>
<!-- set up a context provider for Server A -->
<Call name="addLifeCycle">
<Arg>
<New class="org.eclipse.jetty.deploy.providers.ContextProvider">
<Set name="contexts"><Ref refid="Contexts"/></Set>
<Set name="configurationDir"><SystemProperty name="jetty.home" default="."/>/contexts</Set>
<Set name="scanInterval">0</Set>
</New>
</Arg>
</Call>
</Configure>
However, I get ClassNotFoundException on SelectChannelConnector. My previous configuratiion programmatically added connectors using the ServerLifeCycleListener based on the users configuration.
My (very) old configuration I've been attempting to migrate is:
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<Configure id="Server" class="org.mortbay.jetty.Server">
<!-- =========================================================== -->
<!-- Server Thread Pool -->
<!-- =========================================================== -->
<Set name="ThreadPool">
<!-- Default bounded blocking threadpool
-->
<New class="org.mortbay.thread.BoundedThreadPool">
<Set name="minThreads">10</Set>
<Set name="maxThreads">250</Set>
<Set name="lowThreads">25</Set>
</New>
</Set>
<!-- =========================================================== -->
<!-- Set handler Collection Structure -->
<!-- =========================================================== -->
<Set name="handler">
<New id="Handlers" class="org.mortbay.jetty.handler.HandlerCollection">
<Set name="handlers">
<Array type="org.mortbay.jetty.Handler">
<Item>
<New id="Contexts" class="org.mortbay.jetty.handler.ContextHandlerCollection"/>
</Item>
<Item>
<New id="DefaultHandler" class="org.mortbay.jetty.handler.DefaultHandler"/>
</Item>
<Item>
<New id="RequestLog" class="org.mortbay.jetty.handler.RequestLogHandler"/>
</Item>
</Array>
</Set>
</New>
</Set>
<!-- listener which adds our connectors -->
<Call name="addLifeCycleListener">
<Arg>
<New class="com.rfcode.jetty.ServerLifeCycleListener"/>
</Arg>
</Call>
<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">0</Set>
</New>
</Arg>
</Call>
<New id="ServerLog" class="java.io.PrintStream">
<Arg>
<New class="org.mortbay.util.RolloverFileOutputStream">
<Arg><SystemProperty name="jetty.home" default="."/>/logs/yyyy_mm_dd.stderrout.log</Arg>
<Arg type="boolean">false</Arg>
<Arg type="int">7</Arg>
<Arg><Call class="java.util.TimeZone" name="getTimeZone"><Arg>GMT</Arg></Call></Arg>
<Get id="ServerLogName" name="datedFilename"/>
</New>
</Arg>
</New>
<Call class="org.mortbay.log.Log" name="info"><Arg>Redirecting stderr/stdout to <Ref id="ServerLogName"/></Arg></Call>
<Call class="java.lang.System" name="setErr"><Arg><Ref id="ServerLog"/></Arg></Call>
<Call class="java.lang.System" name="setOut"><Arg><Ref id="ServerLog"/></Arg></Call>
<!-- =========================================================== -->
<!-- extra options -->
<!-- =========================================================== -->
<Set name="stopAtShutdown">true</Set>
<Set name="sendServerVersion">true</Set>
<Set name="sendDateHeader">true</Set>
<Set name="gracefulShutdown">1000</Set>
</Configure>
I appreciate any pointers you can offer.
Regards,
Marty Stich
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx<mailto:jetty-users@xxxxxxxxxxx><mailto:jetty-users@xxxxxxxxxxx<mailto:jetty-users@xxxxxxxxxxx>>
https://dev.eclipse.org/mailman/listinfo/jetty-users
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx<mailto:jetty-users@xxxxxxxxxxx>
https://dev.eclipse.org/mailman/listinfo/jetty-users