You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Ghodmode <gh...@ghodmode.com> on 2007/09/01 01:59:03 UTC

application deployment

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

Re: application deployment

Posted by Igor Vaynberg <ig...@gmail.com>.
a war works on any container.

it is easier to develop on jetty, then when ready deploy on tomcat

-igor


On 9/4/07, Ghodmode <gh...@ghodmode.com> wrote:
>
> On 9/5/07, Gwyn Evans <gw...@gmail.com> wrote:
> >
> > On Saturday, September 1, 2007, 8:49:15 AM, Ghodmode <
> > ghodmode@ghodmode.com> wrote:
> > ...
>
>
> Now you've got a working baseline, I'd really recommend trying to get
> > it running with Jetty, either with or without the archetype. For one
> > thing, Jetty's default 'root' context page provides a clickable list
> > of contexts that it knows about, which I've often found a useful
> > feature!
> >
> > /Gwyn
> >
> > I didn't have any problem getting it to run with Jetty.  Unfortunately,
> that doesn't do anything for me as one of my current requirements is that
> it
> must run on the latest version of Tomcat.
>
> I guess Jetty is pretty popular.  I may play with it in the future when I
> have more time on my hands.
>
> Thank you,
>     -- Vince
>

Re: application deployment

Posted by Ghodmode <gh...@ghodmode.com>.
On 9/5/07, Gwyn Evans <gw...@gmail.com> wrote:
>
> On Saturday, September 1, 2007, 8:49:15 AM, Ghodmode <
> ghodmode@ghodmode.com> wrote:
> ...


Now you've got a working baseline, I'd really recommend trying to get
> it running with Jetty, either with or without the archetype. For one
> thing, Jetty's default 'root' context page provides a clickable list
> of contexts that it knows about, which I've often found a useful
> feature!
>
> /Gwyn
>
> I didn't have any problem getting it to run with Jetty.  Unfortunately,
that doesn't do anything for me as one of my current requirements is that it
must run on the latest version of Tomcat.

I guess Jetty is pretty popular.  I may play with it in the future when I
have more time on my hands.

Thank you,
    -- Vince

Re: application deployment

Posted by Gwyn Evans <gw...@gmail.com>.
On Saturday, September 1, 2007, 8:49:15 AM, Ghodmode <gh...@ghodmode.com> wrote:

> The URL I actually need is
> http://localhost:8080/helloworld1/helloworld1  I
> don't need to include the name of the servlet at all, and that was my
> mistake.  As I suspected originally, it was a stupid mistake to begin with.
> I do know better... usually.

> Thank you very much for your time.

> -- Vince

Now you've got a working baseline, I'd really recommend trying to get
it running with Jetty, either with or without the archetype. For one
thing, Jetty's default 'root' context page provides a clickable list
of contexts that it knows about, which I've often found a useful
feature!

/Gwyn


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: application deployment

Posted by Ghodmode <gh...@ghodmode.com>.
On 9/1/07, Igor Vaynberg <ig...@gmail.com> wrote:
>
> On 8/31/07, Ghodmode <gh...@ghodmode.com> wrote:
> ...


your servlet mapping is /helloworld1/* so the homepage url for your
> application is of form
>
> http://server/context/helloworld1/
>
> assuming you are running localhost and your context is root the url is
> http://localhost/helloworld1 like i said
>

I'm sorry Igor.  This was all my misunderstanding.  In your last email I saw
the regular beginning of the URL (http://localhost:8080/helloworld1)
followed by the entire URL again enclosed within angle-brackets.  That's the
part that I said wasn't a valid URL.  Maybe it was some problem in the
mailing list's processing of the email ::shrug::

I think I've discovered what I've been missing, and I realized it when you
mentioned the context.  I was treating the context and the pattern as if
they were the same thing and then foolishly adding the name of the
application class.

The URL I actually need is http://localhost:8080/helloworld1/helloworld1  I
don't need to include the name of the servlet at all, and that was my
mistake.  As I suspected originally, it was a stupid mistake to begin with.
I do know better... usually.

Thank you very much for your time.

-- Vince

Re: application deployment

Posted by Igor Vaynberg <ig...@gmail.com>.
On 8/31/07, Ghodmode <gh...@ghodmode.com> wrote:
>
>     For the record, the URL I'm using is
> http://localhost:8080/helloworld1/HelloWorld1Application  This is based on
> a
> url-pattern in the servlet mapping of "/helloworld1/*" and a servlet-name
> of
> "HelloWorld1Application".
>
>     I'm still getting a 404 error from Tomcat.
>
> Thank you,
>     Vince
>
> On 9/1/07, Igor Vaynberg <ig...@gmail.com> wrote:
> >
> > the url you are accesing is wrong
> >
> > http://localhost:8080/helloworld1/HelloWorld1Application
> >
> > you should access
> >
> > http://localhost:8080/helloworld1/<
> > http://localhost:8080/helloworld1/HelloWorld1Application>
> >
> > -igor
>
>
> Hi Igor,
>     That doesn't make sense.  It's not even a valid URL.  Was there a
> typographical error?
>
>     Were you talking about my earlier reference to http://home?  My
> computer's host name is home, so going to http://home is the same as going
> to http://localhost.  However, having tried everything else, I tried the
> URL
> with both home and localhost anyway.
>
> Thanks anyway :)


no, i meant what i said

your servlet mapping is /helloworld1/* so the homepage url for your
application is of form

http://server/context/helloworld1/

assuming you are running localhost and your context is root the url is
http://localhost/helloworld1 like i said

-igor




On 8/31/07, Ghodmode <gh...@ghodmode.com> wrote:
> > >
> > > more information:
> > >
> > >    - I'm trying to access the page at
> > >    http://localhost:8080/helloworld1/HelloWorld1Application
> > >    - I realized that I didn't have the HelloWorld1.html file in the
> > right
> > >    place and I put it in the mypackage folder
> > >    - I also tried removing the package from the code of both
> > >    HelloWorld1.java, HelloWorld1Application.java.  I moved the files
> up
> > >    to the classes directory and recompiled so that both classes and
> the
> > > HTML
> > >    file were all in the same directory exactly as defined in the
> > > deployment
> > >    section in the new user guide in the wiki (ref:
> > >
> > >
> >
> http://cwiki.apache.org/WICKET/newuserguide.html#Newuserguide-Deployingtheapplication
> > >    )
> > >
> > > After stopping and re-starting Tomcat, I still haven't had any luck.
> > >
> > > Thank you,
> > >     Vince
> > >
> > > On 9/1/07, Ghodmode <gh...@ghodmode.com> wrote:
> > > >
> > > > 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
> > > >
> > >
> >
>

Re: application deployment

Posted by Ghodmode <gh...@ghodmode.com>.
    For the record, the URL I'm using is
http://localhost:8080/helloworld1/HelloWorld1Application  This is based on a
url-pattern in the servlet mapping of "/helloworld1/*" and a servlet-name of
"HelloWorld1Application".

    I'm still getting a 404 error from Tomcat.

Thank you,
    Vince

On 9/1/07, Igor Vaynberg <ig...@gmail.com> wrote:
>
> the url you are accesing is wrong
>
> http://localhost:8080/helloworld1/HelloWorld1Application
>
> you should access
>
> http://localhost:8080/helloworld1/<
> http://localhost:8080/helloworld1/HelloWorld1Application>
>
> -igor


Hi Igor,
    That doesn't make sense.  It's not even a valid URL.  Was there a
typographical error?

    Were you talking about my earlier reference to http://home?  My
computer's host name is home, so going to http://home is the same as going
to http://localhost.  However, having tried everything else, I tried the URL
with both home and localhost anyway.

Thanks anyway :)

On 8/31/07, Ghodmode <gh...@ghodmode.com> wrote:
> >
> > more information:
> >
> >    - I'm trying to access the page at
> >    http://localhost:8080/helloworld1/HelloWorld1Application
> >    - I realized that I didn't have the HelloWorld1.html file in the
> right
> >    place and I put it in the mypackage folder
> >    - I also tried removing the package from the code of both
> >    HelloWorld1.java, HelloWorld1Application.java.  I moved the files up
> >    to the classes directory and recompiled so that both classes and the
> > HTML
> >    file were all in the same directory exactly as defined in the
> > deployment
> >    section in the new user guide in the wiki (ref:
> >
> >
> http://cwiki.apache.org/WICKET/newuserguide.html#Newuserguide-Deployingtheapplication
> >    )
> >
> > After stopping and re-starting Tomcat, I still haven't had any luck.
> >
> > Thank you,
> >     Vince
> >
> > On 9/1/07, Ghodmode <gh...@ghodmode.com> wrote:
> > >
> > > 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
> > >
> >
>

Re: application deployment

Posted by Igor Vaynberg <ig...@gmail.com>.
the url you are accesing is wrong

http://localhost:8080/helloworld1/HelloWorld1Application

you should access

http://localhost:8080/helloworld1/<http://localhost:8080/helloworld1/HelloWorld1Application>

-igor


On 8/31/07, Ghodmode <gh...@ghodmode.com> wrote:
>
> more information:
>
>    - I'm trying to access the page at
>    http://localhost:8080/helloworld1/HelloWorld1Application
>    - I realized that I didn't have the HelloWorld1.html file in the right
>    place and I put it in the mypackage folder
>    - I also tried removing the package from the code of both
>    HelloWorld1.java, HelloWorld1Application.java.  I moved the files up
>    to the classes directory and recompiled so that both classes and the
> HTML
>    file were all in the same directory exactly as defined in the
> deployment
>    section in the new user guide in the wiki (ref:
>
> http://cwiki.apache.org/WICKET/newuserguide.html#Newuserguide-Deployingtheapplication
>    )
>
> After stopping and re-starting Tomcat, I still haven't had any luck.
>
> Thank you,
>     Vince
>
> On 9/1/07, Ghodmode <gh...@ghodmode.com> wrote:
> >
> > 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
> >
>

Re: application deployment

Posted by Ghodmode <gh...@ghodmode.com>.
more information:

   - I'm trying to access the page at
   http://localhost:8080/helloworld1/HelloWorld1Application
   - I realized that I didn't have the HelloWorld1.html file in the right
   place and I put it in the mypackage folder
   - I also tried removing the package from the code of both
   HelloWorld1.java, HelloWorld1Application.java.  I moved the files up
   to the classes directory and recompiled so that both classes and the HTML
   file were all in the same directory exactly as defined in the deployment
   section in the new user guide in the wiki (ref:
   http://cwiki.apache.org/WICKET/newuserguide.html#Newuserguide-Deployingtheapplication
   )

After stopping and re-starting Tomcat, I still haven't had any luck.

Thank you,
    Vince

On 9/1/07, Ghodmode <gh...@ghodmode.com> wrote:
>
> 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
>

Re: application deployment

Posted by Ghodmode <gh...@ghodmode.com>.
Thank you for your reply Igor,
    I'm using http://home:8080/helloworld1/HelloWorld1Application

I'll look at the archetypes info.  I don't know Maven very well and I don't
know Jetty at all.  Even if I get it working with Maven and Jetty using the
instructions at the README you provided I won't know how to duplicate those
results using my own application under Tomcat.

Thank you,
    Vince

On 9/1/07, Igor Vaynberg <ig...@gmail.com> wrote:
>
> what url are you hitting when you get a 404?  also see this:
>
> https://svn.apache.org/repos/asf/wicket/trunk/archetypes/README
>
> it will let you quickly build a properly configured app - use archetype
> version 1.3.0-beta3
>
> -igor
>
>
>
>
> On 8/31/07, Ghodmode <gh...@ghodmode.com> wrote:
> >
> > 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
> >
>

Re: application deployment

Posted by Igor Vaynberg <ig...@gmail.com>.
what url are you hitting when you get a 404?  also see this:

https://svn.apache.org/repos/asf/wicket/trunk/archetypes/README

it will let you quickly build a properly configured app - use archetype
version 1.3.0-beta3

-igor




On 8/31/07, Ghodmode <gh...@ghodmode.com> wrote:
>
> 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
>