Author: ehillenius Date: Sun Jan 14 20:57:45 2007 New Revision: 496232 URL: http://svn.apache.org/viewvc?view=rev&rev=496232 Log: var fixes
Removed: incubator/wicket/trunk/wicket-spring-examples/src/main/java/jetty-config.xml Modified: incubator/wicket/trunk/wicket-spring-examples/.classpath incubator/wicket/trunk/wicket-spring-examples/.project incubator/wicket/trunk/wicket-spring-examples/pom.xml incubator/wicket/trunk/wicket-spring-examples/src/main/java/wicket/spring/StartSpringExamples.java Modified: incubator/wicket/trunk/wicket-spring-examples/.classpath URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket-spring-examples/.classpath?view=diff&rev=496232&r1=496231&r2=496232 ============================================================================== --- incubator/wicket/trunk/wicket-spring-examples/.classpath (original) +++ incubator/wicket/trunk/wicket-spring-examples/.classpath Sun Jan 14 20:57:45 2007 @@ -2,18 +2,21 @@ <classpath> <classpathentry kind="src" path="src/main/java"/> <classpathentry kind="src" path="src/main/resources"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> - <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/> - <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3-sources.jar"/> - <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.1.0/slf4j-api-1.1.0.jar" sourcepath="M2_REPO/org/slf4j/slf4j-api/1.1.0/slf4j-api-1.1.0-sources.jar"/> - <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/2.1/commons-collections-2.1.jar" sourcepath="M2_REPO/commons-collections/commons-collections/2.1/commons-collections-2.1-sources.jar"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/servlet-api-2.5/6.0.1/servlet-api-2.5-6.0.1.jar"/> <classpathentry kind="var" path="M2_REPO/cglib/cglib/2.1_3/cglib-2.1_3.jar" sourcepath="M2_REPO/cglib/cglib/2.1_3/cglib-2.1_3-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/jetty-management/6.0.1/jetty-management-6.0.1.jar"/> + <classpathentry kind="var" path="M2_REPO/asm/asm/1.5.3/asm-1.5.3.jar"/> + <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/jetty/6.0.1/jetty-6.0.1.jar" sourcepath="M2_REPO/org/mortbay/jetty/jetty/6.0.1/jetty-6.0.1-sources.jar"/> <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.13/log4j-1.2.13.jar" sourcepath="M2_REPO/log4j/log4j/1.2.13/log4j-1.2.13-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar" sourcepath="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/2.1/commons-collections-2.1.jar" sourcepath="M2_REPO/commons-collections/commons-collections/2.1/commons-collections-2.1-sources.jar"/> <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.1.0/slf4j-log4j12-1.1.0.jar" sourcepath="M2_REPO/org/slf4j/slf4j-log4j12/1.1.0/slf4j-log4j12-1.1.0-sources.jar"/> - <classpathentry kind="var" path="M2_REPO/asm/asm/1.5.3/asm-1.5.3.jar"/> - <classpathentry kind="var" path="M2_REPO/jetty/jasper-runtime/4.2.20RC0/jasper-runtime-4.2.20RC0.jar"/> - <classpathentry kind="var" path="M2_REPO/jetty/jetty/4.2.9/jetty-4.2.9.jar"/> - <classpathentry kind="var" path="M2_REPO/jetty/jasper-compiler/4.2.20RC0/jasper-compiler-4.2.20RC0.jar"/> + <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/jetty-util/6.0.1/jetty-util-6.0.1.jar" sourcepath="M2_REPO/org/mortbay/jetty/jetty-util/6.0.1/jetty-util-6.0.1-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.1.0/slf4j-api-1.1.0.jar" sourcepath="M2_REPO/org/slf4j/slf4j-api/1.1.0/slf4j-api-1.1.0-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/mx4j/mx4j-tools/3.0.1/mx4j-tools-3.0.1.jar" sourcepath="M2_REPO/mx4j/mx4j-tools/3.0.1/mx4j-tools-3.0.1-sources.jar"/> <classpathentry combineaccessrules="false" kind="src" path="/wicket"/> <classpathentry combineaccessrules="false" kind="src" path="/wicket-extensions"/> <classpathentry combineaccessrules="false" kind="src" path="/wicket-spring"/> Modified: incubator/wicket/trunk/wicket-spring-examples/.project URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket-spring-examples/.project?view=diff&rev=496232&r1=496231&r2=496232 ============================================================================== --- incubator/wicket/trunk/wicket-spring-examples/.project (original) +++ incubator/wicket/trunk/wicket-spring-examples/.project Sun Jan 14 20:57:45 2007 @@ -1,17 +1,14 @@ -<?xml version="1.0" encoding="UTF-8"?> <projectDescription> - <name>wicket-spring-examples</name> - <comment>Examples project for using annotation based Spring integration in Wicket applications. This requires Java 5.</comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> + <name>wicket-spring-examples</name> + <comment>Examples project for using annotation based Spring integration in Wicket applications. This requires Java 5.</comment> + <projects/> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments/> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> \ No newline at end of file Modified: incubator/wicket/trunk/wicket-spring-examples/pom.xml URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket-spring-examples/pom.xml?view=diff&rev=496232&r1=496231&r2=496232 ============================================================================== --- incubator/wicket/trunk/wicket-spring-examples/pom.xml (original) +++ incubator/wicket/trunk/wicket-spring-examples/pom.xml Sun Jan 14 20:57:45 2007 @@ -110,24 +110,19 @@ <!-- jetty launcher dependencies --> <dependency> - <groupId>jetty</groupId> + <groupId>org.mortbay.jetty</groupId> <artifactId>jetty</artifactId> - <version>4.2.9</version> - <scope>provided</scope> + <version>6.0.1</version> </dependency> - <dependency> - <groupId>jetty</groupId> - <artifactId>jasper-runtime</artifactId> - <version>4.2.20RC0</version> - <scope>provided</scope> + <groupId>org.mortbay.jetty</groupId> + <artifactId>jetty-util</artifactId> + <version>6.0.1</version> </dependency> - <dependency> - <groupId>jetty</groupId> - <artifactId>jasper-compiler</artifactId> - <version>4.2.20RC0</version> - <scope>provided</scope> + <groupId>org.mortbay.jetty</groupId> + <artifactId>jetty-management</artifactId> + <version>6.0.1</version> </dependency> </dependencies> Modified: incubator/wicket/trunk/wicket-spring-examples/src/main/java/wicket/spring/StartSpringExamples.java URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket-spring-examples/src/main/java/wicket/spring/StartSpringExamples.java?view=diff&rev=496232&r1=496231&r2=496232 ============================================================================== --- incubator/wicket/trunk/wicket-spring-examples/src/main/java/wicket/spring/StartSpringExamples.java (original) +++ incubator/wicket/trunk/wicket-spring-examples/src/main/java/wicket/spring/StartSpringExamples.java Sun Jan 14 20:57:45 2007 @@ -17,28 +17,20 @@ */ package wicket.spring; -import java.net.URL; - -import org.apache.log4j.BasicConfigurator; +import org.mortbay.jetty.Connector; import org.mortbay.jetty.Server; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.mortbay.jetty.nio.SelectChannelConnector; +import org.mortbay.jetty.webapp.WebAppContext; /** * Seperate startup class for people that want to run the examples directly. */ -public class StartSpringExamples -{ - /** - * Used for logging. - */ - private static final Logger log = LoggerFactory.getLogger(StartSpringExamples.class); +public class StartSpringExamples { /** * Construct. */ - StartSpringExamples() - { + StartSpringExamples() { super(); } @@ -47,34 +39,29 @@ * * @param args */ - public static void main(String[] args) - { - BasicConfigurator.configure(); - Server jettyServer = null; - try - { - URL jettyConfig = new URL("file:src/main/java/jetty-config.xml"); - if (jettyConfig == null) - { - log.error("Unable to locate jetty-config.xml on the classpath"); - } - jettyServer = new Server(jettyConfig); - jettyServer.start(); - } - catch (Exception e) - { - log.error("Could not start the Jetty server: " + e); - if (jettyServer != null) - { - try - { - jettyServer.stop(); - } - catch (InterruptedException e1) - { - log.error("Unable to stop the jetty server: " + e1); - } - } + public static void main(String[] args) { + Server server = new Server(); + SelectChannelConnector connector = new SelectChannelConnector(); + connector.setPort(8080); + server.setConnectors(new Connector[] { connector }); + + WebAppContext web = new WebAppContext(); + web.setContextPath("/wicket-spring-examples"); + web.setWar("src/main/webapp"); + server.addHandler(web); + + // Turn this on when you want to use JMX + // MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer(); + // MBeanContainer mBeanContainer = new MBeanContainer(mBeanServer); + // server.getContainer().addEventListener(mBeanContainer); + // mBeanContainer.start(); + + try { + server.start(); + server.join(); + } catch (Exception e) { + e.printStackTrace(); + System.exit(100); } } }