• R/O
  • SSH
  • HTTPS

wicket-ja: Commit


Commit MetaInfo

Revision5 (tree)
Time2008-01-23 22:01:30
Authoryoichiro

Log Message

初期インポート。

Change Summary

Incremental Difference

--- trunk/wicket-ja/src/test/java/org/wicketja/site/TestHomePage.java (nonexistent)
+++ trunk/wicket-ja/src/test/java/org/wicketja/site/TestHomePage.java (revision 5)
@@ -0,0 +1,30 @@
1+package org.wicketja.site;
2+
3+import junit.framework.TestCase;
4+import org.apache.wicket.util.tester.WicketTester;
5+import org.wicketja.site.HomePage;
6+
7+/**
8+ * Simple test using the WicketTester
9+ */
10+public class TestHomePage extends TestCase
11+{
12+ private WicketTester tester;
13+
14+ public void setUp()
15+ {
16+ tester = new WicketTester();
17+ }
18+
19+ public void testRenderMyPage()
20+ {
21+ //start and render the test page
22+ tester.startPage(HomePage.class);
23+
24+ //assert rendered page class
25+ tester.assertRenderedPage(HomePage.class);
26+
27+ //assert rendered label component
28+ tester.assertLabel("message", "If you see this message wicket is properly configured and running");
29+ }
30+}
--- trunk/wicket-ja/src/test/java/org/wicketja/site/Start.java (nonexistent)
+++ trunk/wicket-ja/src/test/java/org/wicketja/site/Start.java (revision 5)
@@ -0,0 +1,46 @@
1+package org.wicketja.site;
2+
3+import org.mortbay.jetty.Connector;
4+import org.mortbay.jetty.Server;
5+import org.mortbay.jetty.bio.SocketConnector;
6+import org.mortbay.jetty.webapp.WebAppContext;
7+
8+public class Start {
9+
10+ public static void main(String[] args) throws Exception {
11+ Server server = new Server();
12+ SocketConnector connector = new SocketConnector();
13+ // Set some timeout options to make debugging easier.
14+ connector.setMaxIdleTime(1000 * 60 * 60);
15+ connector.setSoLingerTime(-1);
16+ connector.setPort(8080);
17+ server.setConnectors(new Connector[] { connector });
18+
19+ WebAppContext bb = new WebAppContext();
20+ bb.setServer(server);
21+ bb.setContextPath("/");
22+ bb.setWar("src/main/webapp");
23+
24+
25+ // START JMX SERVER
26+ // MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
27+ // MBeanContainer mBeanContainer = new MBeanContainer(mBeanServer);
28+ // server.getContainer().addEventListener(mBeanContainer);
29+ // mBeanContainer.start();
30+
31+ server.addHandler(bb);
32+
33+ try {
34+ System.out.println(">>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP");
35+ server.start();
36+ while (System.in.available() == 0) {
37+ Thread.sleep(5000);
38+ }
39+ server.stop();
40+ server.join();
41+ } catch (Exception e) {
42+ e.printStackTrace();
43+ System.exit(100);
44+ }
45+ }
46+}
--- trunk/wicket-ja/src/main/java/org/wicketja/site/HomePage.java (nonexistent)
+++ trunk/wicket-ja/src/main/java/org/wicketja/site/HomePage.java (revision 5)
@@ -0,0 +1,29 @@
1+package org.wicketja.site;
2+
3+import org.apache.wicket.PageParameters;
4+import org.apache.wicket.markup.html.basic.Label;
5+import org.apache.wicket.markup.html.WebPage;
6+
7+/**
8+ * Homepage
9+ */
10+public class HomePage extends WebPage {
11+
12+ private static final long serialVersionUID = 1L;
13+
14+ // TODO Add any page properties or variables here
15+
16+ /**
17+ * Constructor that is invoked when page is invoked without a session.
18+ *
19+ * @param parameters
20+ * Page parameters
21+ */
22+ public HomePage(final PageParameters parameters) {
23+
24+ // Add the simplest type of label
25+ add(new Label("message", "If you see this message wicket is properly configured and running"));
26+
27+ // TODO Add your page's components here
28+ }
29+}
--- trunk/wicket-ja/src/main/java/org/wicketja/site/HomePage.html (nonexistent)
+++ trunk/wicket-ja/src/main/java/org/wicketja/site/HomePage.html (revision 5)
@@ -0,0 +1,11 @@
1+<html>
2+ <head>
3+ <title>Wicket Quickstart Archetype Homepage</title>
4+ </head>
5+ <body>
6+ <strong>Wicket Quickstart Archetype Homepage</strong>
7+ <br/><br/>
8+ <span wicket:id="message">message will be here</span>
9+ </body>
10+</html>
11+
--- trunk/wicket-ja/src/main/java/org/wicketja/site/WicketApplication.java (nonexistent)
+++ trunk/wicket-ja/src/main/java/org/wicketja/site/WicketApplication.java (revision 5)
@@ -0,0 +1,28 @@
1+package org.wicketja.site;
2+
3+import org.apache.wicket.protocol.http.WebApplication;
4+
5+/**
6+ * Application object for your web application. If you want to run this application without deploying, run the Start class.
7+ *
8+ * @see wicket.myproject.Start#main(String[])
9+ */
10+public class WicketApplication extends WebApplication
11+{
12+ /**
13+ * Constructor
14+ */
15+ public WicketApplication()
16+ {
17+ }
18+
19+ /**
20+ * @see wicket.Application#getHomePage()
21+ */
22+ @SuppressWarnings("unchecked")
23+ public Class getHomePage()
24+ {
25+ return HomePage.class;
26+ }
27+
28+}
--- trunk/wicket-ja/src/main/webapp/WEB-INF/web.xml (nonexistent)
+++ trunk/wicket-ja/src/main/webapp/WEB-INF/web.xml (revision 5)
@@ -0,0 +1,34 @@
1+<?xml version="1.0" encoding="ISO-8859-1"?>
2+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
3+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
5+ version="2.4">
6+
7+ <display-name>wicket-ja</display-name>
8+
9+ <!--
10+ There are three means to configure Wickets configuration mode and they are
11+ tested in the order given.
12+ 1) A system property: -Dwicket.configuration
13+ 2) servlet specific <init-param>
14+ 3) context specific <context-param>
15+ The value might be either "development" (reloading when templates change)
16+ or "deployment". If no configuration is found, "development" is the default.
17+ -->
18+
19+ <filter>
20+ <filter-name>wicket.wicket-ja</filter-name>
21+ <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
22+ <init-param>
23+ <param-name>applicationClassName</param-name>
24+ <param-value>org.wicketja.site.WicketApplication</param-value>
25+ </init-param>
26+ </filter>
27+
28+ <filter-mapping>
29+ <filter-name>wicket.wicket-ja</filter-name>
30+ <url-pattern>/*</url-pattern>
31+ </filter-mapping>
32+
33+
34+</web-app>
--- trunk/wicket-ja/pom.xml (nonexistent)
+++ trunk/wicket-ja/pom.xml (revision 5)
@@ -0,0 +1,130 @@
1+<project xmlns="http://maven.apache.org/POM/4.0.0"
2+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4+
5+ <modelVersion>4.0.0</modelVersion>
6+ <groupId>org.wicket-ja</groupId>
7+ <artifactId>wicket-ja</artifactId>
8+ <packaging>war</packaging>
9+ <version>1.0-SNAPSHOT</version>
10+ <!-- TODO project name -->
11+ <name>quickstart</name>
12+ <description></description>
13+
14+ <!-- TODO
15+ <organization>
16+ <name>company name</name>
17+ <url>company url</url>
18+ </organization>
19+ -->
20+
21+ <licenses>
22+ <license>
23+ <name>The Apache Software License, Version 2.0</name>
24+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
25+ <distribution>repo</distribution>
26+ </license>
27+ </licenses>
28+
29+ <dependencies>
30+ <!-- WICKET DEPENDENCIES -->
31+
32+ <dependency>
33+ <groupId>org.apache.wicket</groupId>
34+ <artifactId>wicket</artifactId>
35+ <version>${wicket.version}</version>
36+ </dependency>
37+ <!-- OPTIONAL
38+ <dependency>
39+ <groupId>org.apache.wicket</groupId>
40+ <artifactId>wicket-extensions</artifactId>
41+ <version>${wicket.version}</version>
42+ </dependency>
43+ -->
44+
45+ <!-- LOGGING DEPENDENCIES - LOG4J -->
46+
47+ <dependency>
48+ <groupId>org.slf4j</groupId>
49+ <artifactId>slf4j-log4j12</artifactId>
50+ <version>1.4.2</version>
51+ </dependency>
52+ <dependency>
53+ <groupId>log4j</groupId>
54+ <artifactId>log4j</artifactId>
55+ <version>1.2.14</version>
56+ </dependency>
57+
58+ <!-- JUNIT DEPENDENCY FOR TESTING -->
59+ <dependency>
60+ <groupId>junit</groupId>
61+ <artifactId>junit</artifactId>
62+ <version>3.8.2</version>
63+ <scope>test</scope>
64+ </dependency>
65+
66+ <!-- JETTY DEPENDENCIES FOR TESTING -->
67+
68+ <dependency>
69+ <groupId>org.mortbay.jetty</groupId>
70+ <artifactId>jetty</artifactId>
71+ <version>${jetty.version}</version>
72+ <scope>provided</scope>
73+ </dependency>
74+ <dependency>
75+ <groupId>org.mortbay.jetty</groupId>
76+ <artifactId>jetty-util</artifactId>
77+ <version>${jetty.version}</version>
78+ <scope>provided</scope>
79+ </dependency>
80+ <dependency>
81+ <groupId>org.mortbay.jetty</groupId>
82+ <artifactId>jetty-management</artifactId>
83+ <version>${jetty.version}</version>
84+ <scope>provided</scope>
85+ </dependency>
86+ </dependencies>
87+
88+ <build>
89+ <resources>
90+ <resource>
91+ <filtering>false</filtering>
92+ <directory>src/main/resources</directory>
93+ </resource>
94+ <resource>
95+ <filtering>false</filtering>
96+ <directory>src/main/java</directory>
97+ <includes>
98+ <include>**</include>
99+ </includes>
100+ <excludes>
101+ <exclude>**/*.java</exclude>
102+ </excludes>
103+ </resource>
104+ </resources>
105+ <testResources>
106+ <testResource>
107+ <filtering>false</filtering>
108+ <directory>src/test/java</directory>
109+ <includes>
110+ <include>**</include>
111+ </includes>
112+ <excludes>
113+ <exclude>**/*.java</exclude>
114+ </excludes>
115+ </testResource>
116+ </testResources>
117+ <plugins>
118+ <plugin>
119+ <groupId>org.mortbay.jetty</groupId>
120+ <artifactId>maven-jetty-plugin</artifactId>
121+ </plugin>
122+ </plugins>
123+ </build>
124+
125+ <properties>
126+ <wicket.version>1.3.0</wicket.version>
127+ <jetty.version>6.1.4</jetty.version>
128+ </properties>
129+
130+</project>
Show on old repository browser