Not sure about starting Jetty automatically, as I use Tomcat and Cargo for
that, but to just start Jetty and test manually, I created an index.html
file with some text to ensure the page was loaded, then I use this
declaration:
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>7.0.0.pre5</version>
<configuration>
<contextPath>/${finalName}</contextPath>
<scanIntervalSeconds>10</scanIntervalSeconds>
<scanTargetPatterns>
<scanTargetPattern>
<directory>src/main/webapp/WEB-INF</directory>
<excludes>
<exclude>**/*.jsp</exclude>
<exclude>**/*.xhtml</exclude>
</excludes>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
</scanTargetPattern>
</scanTargetPatterns>
</configuration>
<dependencies>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
</dependencies>
</plugin>
---
Thank You…
Mick Knutson, President
BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring & Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233
Website: http://baselogic.com
Linked IN: http://linkedin.com/in/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---
On Wed, Sep 9, 2009 at 10:43 AM, Neil Chaudhuri <
[email protected]> wrote:
> I am trying to get the Jetty plugin to work with Hibernate's c3p0
> connection pool. The server seems to start just fine with run-war, but when
> I navigate to any URL at localhost:8080, I see nothing but a blank page. And
> I mean ANY. If it is just literally localhost:8080, I see a blank page. If I
> navigate to a "good" URL, I see a blank page. If I navigate to a "bad" URL,
> I a blank page rather than a 404 or a 500 error.
>
> Here is my configuration:
>
> <plugin>
> <groupId>org.mortbay.jetty</groupId>
> <artifactId>maven-jetty-plugin</artifactId>
> <version>6.1.11</version>
> <configuration>
> <webApp>target/services.war</webApp>
> <webAppConfig>
> <contextPath>/services</contextPath>
> </webAppConfig>
>
> <jettyConfig>src/test/resources/jetty/jetty.xml</jettyConfig>
> <requestLog
> implementation="org.mortbay.jetty.NCSARequestLog">
> <filename>target/yyyy_mm_dd.request.log</filename>
> <retainDays>90</retainDays>
> <append>true</append>
> <extended>false</extended>
> <logTimeZone>GMT</logTimeZone>
> </requestLog>
> <connectors>
> <connector
> implementation="org.mortbay.jetty.nio.SelectChannelConnector">
> <port>8080</port>
> <maxIdleTime>60000</maxIdleTime>
> </connector>
> </connectors>
> </configuration>
> <executions>
> <execution>
> <id>start-jetty</id>
> <phase>pre-integration-test</phase>
> <goals>
> <goal>run</goal>
> </goals>
> <configuration>
> <scanIntervalSeconds>0</scanIntervalSeconds>
> <daemon>true</daemon>
> </configuration>
> </execution>
> <execution>
> <id>stop-jetty</id>
> <phase>post-integration-test</phase>
> <goals>
> <goal>stop</goal>
> </goals>
> </execution>
> </executions>
> <dependencies>
> <dependency>
> <groupId>c3p0</groupId>
> <artifactId>c3p0</artifactId>
> <version>0.9.1.2</version>
> </dependency>
> <dependency>
> <groupId>com.oracle.jdbc</groupId>
> <artifactId>ojdbc6</artifactId>
> <version>${oracle.driver.version}</version>
> </dependency>
> </dependencies>
> </plugin>
>
> Incidentally, the jetty.xml file in the jettyConfig element contains
> nothing but c3p0 stuff being bound to a JNDI datasource. Also, the request
> log file is created but blank as well.
>
> As you can imagine, failure with no feedback is frustrating. Any insight is
> appreciated.
>
> Thanks.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>