Wicket Hello World application

This commit is contained in:
diego 2016-08-01 18:53:03 +02:00
parent ffcd83697a
commit 01b75f259b
6 changed files with 73 additions and 0 deletions

View File

@ -101,6 +101,7 @@
<module>lombok</module>
<module>redis</module>
<module>webjars</module>
<module>wicket-intro</module>
<module>mutation-testing</module>
<module>spring-mvc-velocity</module>

26
wicket-intro/pom.xml Normal file
View File

@ -0,0 +1,26 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.baeldung.wicket.examples</groupId>
<artifactId>HelloWorld</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>HelloWorld Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-core</artifactId>
<version>8.0.0-M1</version>
</dependency>
</dependencies>
<build>
<finalName>HelloWorld</finalName>
</build>
</project>

View File

@ -0,0 +1,5 @@
<html>
<body>
<span wicket:id="hello"></span>
</body>
</html>

View File

@ -0,0 +1,10 @@
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
package com.baeldung.wicket.examples;
public class HelloWorld extends WebPage {
public HelloWorld() {
add(new Label("hello", "Hello World!"));
}
}

View File

@ -0,0 +1,11 @@
import org.apache.wicket.Page;
import org.apache.wicket.protocol.http.WebApplication;
package com.baeldung.wicket.examples;
public class HelloWorldApplication extends WebApplication {
@Override
public Class<? extends Page> getHomePage() {
return HelloWorld.class;
}
}

View File

@ -0,0 +1,20 @@
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
<display-name>Hello World</display-name>
<filter>
<filter-name>HelloWorldApplication</filter-name>
<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
<init-param>
<param-name>applicationClassName</param-name>
<param-value>com.baeldung.wicket.examples.HelloWorldApplication</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>HelloWorldApplication</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>