I'm new to Wicket, so I'm starting with the first example from the
documentation and I'm having some trouble getting it to run.  Visiting the
Web app's page, I get a Tomcat 404 error.

I must be making an obvious mistake, but I can't see it.  Can anyone see
what's wrong? ...

Here's my directory structure relative to Tomcat's webapps folder:
helloworld1/:
total 8
-rw-r--r-- 1 vince vince   65 2007-09-01 11:28 index.html
drwxrwxrwx 4 root  root  4096 2007-09-01 11:47 WEB-INF

helloworld1/WEB-INF:
total 12
-rwxrwxrwx 1 root  root   796 2007-09-01 08:28 web.xml
drwxr-xr-x 3 vince vince 4096 2007-09-01 08:58 classes
drwxrwxrwx 2 root  root  4096 2007-09-01 11:28 lib

helloworld1/WEB-INF/classes:
total 4
drwxr-xr-x 2 vince vince 4096 2007-09-01 11:48 mypackage

helloworld1/WEB-INF/classes/mypackage:
total 16
-rwxr-xr-x 1 vince vince 243 2007-09-01 09:14 HelloWorld1.java
-rwxr-xr-x 1 vince vince 238 2007-09-01 09:34 HelloWorld1Application.java
-rw-r--r-- 1 vince vince 473 2007-09-01 09:35 HelloWorld1.class
-rw-r--r-- 1 vince vince 363 2007-09-01 09:35 HelloWorld1Application.class

helloworld1/WEB-INF/lib:
total 1648
-rw-r--r-- 1 vince vince    7449 2007-09-01 11:25 slf4j-simple-1.4.3.jar
-rw-r--r-- 1 vince vince   15345 2007-09-01 11:26 slf4j-api-1.4.3.jar
-rw-r--r-- 1 vince vince 1657246 2007-09-01 11:28 wicket-1.3.0-beta3.jar


Here's my WebApplication:
package mypackage;

import org.apache.wicket.protocol.http.WebApplication;

public class HelloWorld1Application extends WebApplication {
        public HelloWorld1Application() { }

        public Class getHomePage() {
                return HelloWorld1.class;
        }
}

Here's my web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!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>
    <context-param>
        <param-name>configuration</param-name>
        <param-value>development</param-value>
    </context-param>

    <servlet>
        <servlet-name>HelloWorld1Application</servlet-name>
        <servlet-class>org.apache.wicket.protocol.http.WicketServlet
</servlet-class>
        <init-param>
            <param-name>applicationClassName</param-name>
            <param-value>mypackage.HelloWorld1Application</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>HelloWorld1Application</servlet-name>
        <url-pattern>/helloworld1/*</url-pattern>
    </servlet-mapping>
</web-app>

Thank you,
    Vince

Reply via email to