I am new to the wicket and would like to deploy a simple well-known helloworld from wicket examples, but without IDE, ant or maven. What I've done:
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<display-name>Wicket Examples</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>HelloWorldApplication</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>HelloWorldApplication</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
HelloWorld.html:
<html>
<body>
<span wicket:id="message">Message goes here!</span>
</body>
</html>
HelloWorld.java:
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
public class HelloWorld extends WebPage
{
public HelloWorld()
{
add(new Label("message", "Hello World!"));
}
}
HelloWorldApplication.java:
import org.apache.wicket.protocol.http.WebApplication;
public class HelloWorldApplication extends WebApplication
{
public Class getHomePage()
{
return HelloWorld.class;
}
}
Wicket HelloWorld.war:
WEB-INF/
WEB-INF/web.xml
WEB-INF/classes/
WEB-INF/classes/HelloWorldApplication.class
WEB-INF/classes/HelloWorld.class
WEB-INF/classes/HelloWorld.html
WEB-INF/lib/
WEB-INF/lib/wicket-1.4.15.jar
WEB-INF/lib/slf4j-api.jar
I'm not sure if I need slf4j-api.jar for this simple example
When deployed to tomcat, http: // localhost: 8080 / wicket-HelloWorld / gives:
The requested resource () is unavailable
What am I doing wrong?
source
share