You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by eh...@apache.org on 2006/10/14 23:17:55 UTC
svn commit: r464033 - in /incubator/wicket/trunk/wicket-examples: .classpath
jetty-examples.launch pom.xml
src/main/java/wicket/examples/StartExamples.java
Author: ehillenius
Date: Sat Oct 14 14:17:53 2006
New Revision: 464033
URL: http://svn.apache.org/viewvc?view=rev&rev=464033
Log:
updated to Jetty 6
Modified:
incubator/wicket/trunk/wicket-examples/.classpath
incubator/wicket/trunk/wicket-examples/jetty-examples.launch
incubator/wicket/trunk/wicket-examples/pom.xml
incubator/wicket/trunk/wicket-examples/src/main/java/wicket/examples/StartExamples.java
Modified: incubator/wicket/trunk/wicket-examples/.classpath
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket-examples/.classpath?view=diff&rev=464033&r1=464032&r2=464033
==============================================================================
--- incubator/wicket/trunk/wicket-examples/.classpath (original)
+++ incubator/wicket/trunk/wicket-examples/.classpath Sat Oct 14 14:17:53 2006
@@ -2,33 +2,38 @@
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/test/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<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/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 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/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4-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/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/jaxen/jaxen/1.1-beta-8/jaxen-1.1-beta-8.jar"/>
+ <classpathentry kind="var" path="M2_REPO/asm/asm/1.5.3/asm-1.5.3.jar"/>
<classpathentry kind="var" path="M2_REPO/xalan/xalan/2.6.0/xalan-2.6.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jdom/jdom/1.0/jdom-1.0.jar" sourcepath="M2_REPO/jdom/jdom/1.0/jdom-1.0-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/com/ibm/icu/icu4j/2.6.1/icu4j-2.6.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/jdom/jdom/1.0/jdom-1.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/jwebunit/jwebunit/1.2/jwebunit-1.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jwebunit/jwebunit/1.2/jwebunit-1.2.jar" sourcepath="M2_REPO/jwebunit/jwebunit/1.2/jwebunit-1.2-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/nekohtml/nekohtml/0.9.5/nekohtml-0.9.5.jar"/>
<classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar" sourcepath="M2_REPO/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/tomcat/jasper-runtime/4.1.30/jasper-runtime-4.1.30.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/tomcat/jasper-runtime/4.1.30/jasper-runtime-4.1.30.jar" sourcepath="M2_REPO/tomcat/jasper-runtime/4.1.30/jasper-runtime-4.1.30-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/servlet-api-2.5/6.0.1/servlet-api-2.5-6.0.1.jar" sourcepath="M2_REPO/org/mortbay/jetty/servlet-api-2.5/6.0.1/servlet-api-2.5-6.0.1-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/ccil/cowan/tagsoup/tagsoup/0.9.7/tagsoup-0.9.7.jar"/>
<classpathentry kind="var" path="M2_REPO/rhino/js/1.6R1/js-1.6R1.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/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/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" sourcepath="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/jetty-management/6.0.1/jetty-management-6.0.1.jar" sourcepath="M2_REPO/org/mortbay/jetty/jetty-management/6.0.1/jetty-management-6.0.1-sources.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/commons-lang/commons-lang/2.0/commons-lang-2.0.jar" sourcepath="M2_REPO/commons-lang/commons-lang/2.0/commons-lang-2.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/jtidy/jtidy/4aug2000r7-dev/jtidy-4aug2000r7-dev.jar"/>
- <classpathentry kind="var" path="M2_REPO/jetty/org.mortbay.jetty/4.2.24/org.mortbay.jetty-4.2.24.jar"/>
- <classpathentry kind="var" path="M2_REPO/tomcat/jasper-compiler/4.1.30/jasper-compiler-4.1.30.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jtidy/jtidy/4aug2000r7-dev/jtidy-4aug2000r7-dev.jar" sourcepath="M2_REPO/jtidy/jtidy/4aug2000r7-dev/jtidy-4aug2000r7-dev-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/xom/xom/1.0b3/xom-1.0b3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/tomcat/jasper-compiler/4.1.30/jasper-compiler-4.1.30.jar" sourcepath="M2_REPO/tomcat/jasper-compiler/4.1.30/jasper-compiler-4.1.30-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/xerces/xmlParserAPIs/2.6.2/xmlParserAPIs-2.6.2.jar"/>
- <classpathentry kind="var" path="M2_REPO/httpunit/httpunit/1.6/httpunit-1.6.jar"/>
+ <classpathentry kind="var" path="M2_REPO/httpunit/httpunit/1.6/httpunit-1.6.jar" sourcepath="M2_REPO/httpunit/httpunit/1.6/httpunit-1.6-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar" sourcepath="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2-sources.jar"/>
- <classpathentry combineaccessrules="false" kind="src" path="/wicket-2.0"/>
- <classpathentry combineaccessrules="false" kind="src" path="/wicket-extensions-2.0"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/wicket"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/wicket-extensions"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: incubator/wicket/trunk/wicket-examples/jetty-examples.launch
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket-examples/jetty-examples.launch?view=diff&rev=464033&r1=464032&r2=464033
==============================================================================
--- incubator/wicket/trunk/wicket-examples/jetty-examples.launch (original)
+++ incubator/wicket/trunk/wicket-examples/jetty-examples.launch Sat Oct 14 14:17:53 2006
@@ -2,10 +2,16 @@
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.mortbay.jetty.Server"/>
<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="src/etc/jetty-config.xml"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="wicket-examples"/>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/wicket-examples"/>
</listAttribute>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
</launchConfiguration>
Modified: incubator/wicket/trunk/wicket-examples/pom.xml
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket-examples/pom.xml?view=diff&rev=464033&r1=464032&r2=464033
==============================================================================
--- incubator/wicket/trunk/wicket-examples/pom.xml (original)
+++ incubator/wicket/trunk/wicket-examples/pom.xml Sat Oct 14 14:17:53 2006
@@ -122,13 +122,6 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>jetty</groupId>
- <artifactId>org.mortbay.jetty</artifactId>
- <version>4.2.24</version>
- <type>jar</type>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>tomcat</groupId>
<artifactId>jasper-runtime</artifactId>
<version>4.1.30</version>
@@ -148,6 +141,21 @@
<version>1.0.b2</version>
<type>jar</type>
<scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-util</artifactId>
+ <version>6.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-management</artifactId>
+ <version>6.0.1</version>
</dependency>
</dependencies>
Modified: incubator/wicket/trunk/wicket-examples/src/main/java/wicket/examples/StartExamples.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket-examples/src/main/java/wicket/examples/StartExamples.java?view=diff&rev=464033&r1=464032&r2=464033
==============================================================================
--- incubator/wicket/trunk/wicket-examples/src/main/java/wicket/examples/StartExamples.java (original)
+++ incubator/wicket/trunk/wicket-examples/src/main/java/wicket/examples/StartExamples.java Sat Oct 14 14:17:53 2006
@@ -1,7 +1,7 @@
/*
* $Id: StartExamples.java 5394 2006-04-16 13:36:52 +0000 (Sun, 16 Apr 2006)
- * jdonnerstag $ $Revision$ $Date: 2006-04-16 13:36:52 +0000 (Sun, 16 Apr
- * 2006) $
+ * jdonnerstag $ $Revision$ $Date: 2006-04-16 13:36:52 +0000 (Sun, 16
+ * Apr 2006) $
*
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
@@ -18,14 +18,22 @@
*/
package wicket.examples;
-import java.net.URL;
+import java.lang.management.ManagementFactory;
+
+import javax.management.MBeanServer;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.mortbay.jetty.Connector;
import org.mortbay.jetty.Server;
+import org.mortbay.jetty.nio.SelectChannelConnector;
+import org.mortbay.jetty.webapp.WebAppContext;
+import org.mortbay.management.MBeanContainer;
/**
- * Seperate startup class for people that want to run the examples directly.
+ * Seperate startup class for people that want to run the examples directly. Use
+ * parameter -Dcom.sun.management.jmxremote to startup JMX (and e.g. connect
+ * with jconsole).
*/
public class StartExamples
{
@@ -35,45 +43,44 @@
private static final Log log = LogFactory.getLog(StartExamples.class);
/**
- * Construct.
- */
- StartExamples()
- {
- super();
- }
-
- /**
* Main function, starts the jetty server.
*
* @param args
*/
public static void main(String[] args)
{
- Server jettyServer = null;
+ Server server = new Server();
+ SelectChannelConnector connector = new SelectChannelConnector();
+ connector.setPort(8080);
+ server.setConnectors(new Connector[] { connector });
+
+ WebAppContext web = new WebAppContext();
+ web.setContextPath("/wicket-examples");
+ web.setWar("src/webapp");
+ server.addHandler(web);
+
+ MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
+ MBeanContainer mBeanContainer = new MBeanContainer(mBeanServer);
+ server.getContainer().addEventListener(mBeanContainer);
+ mBeanContainer.start();
+
try
{
- URL jettyConfig = new URL("file:src/etc/jetty-config.xml");
- if (jettyConfig == null)
- {
- log.fatal("Unable to locate jetty-test-config.xml on the classpath");
- }
- jettyServer = new Server(jettyConfig);
- jettyServer.start();
+ server.start();
+ server.join();
}
catch (Exception e)
{
- log.fatal("Could not start the Jetty server: " + e);
- if (jettyServer != null)
- {
- try
- {
- jettyServer.stop();
- }
- catch (InterruptedException e1)
- {
- log.fatal("Unable to stop the jetty server: " + e1);
- }
- }
+ e.printStackTrace();
+ System.exit(100);
}
+ }
+
+ /**
+ * Construct.
+ */
+ StartExamples()
+ {
+ super();
}
}