You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Alexander Landsnes Keül <Al...@visma.no> on 2007/10/30 15:14:38 UTC

Setting up Wicket with Tomcat

After much sweat and tears I've finally been able to get web.xml to load properly in tomcat, however I'm having a bit of issues actually starting the Web app. What I've got is the very bare bones of a wicket application. Just a class extending WebApplication, and StartPage.java/html. Startpage.html only prints "Hello", so the wicket code itself ought to be clean, had much more complicated wickets with the embedded Jetty plugin.

They belong to the package no.unique.ansatt.presentation, my web.xml looks as follows: 

<?xml version="1.0"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
	xmlns:xsi="http://www.w3.org/TR/xmlschema-1/"
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
	version="2.4">
	<display-name>Ansatt</display-name>
	<filter>
		<filter-name>WicketFilter</filter-name>
		<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
		<init-param>
			<param-name>applicationClassName</param-name>
			<param-value>no.unique.ansatt.presentation.StartPage</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>
			<filter-name>WicketFilter</filter-name>
			<url-pattern>/ansatt/*</url-pattern>
		</filter-name>
	</filter-mapping>
</web-app>

Now, the problem is where should I build the output? I've tried pretty much all the combinations I can think of, and currently it's built to:
- ansatt/target/WEB-INF/web.xml
- ansatt/target/WEB-INF/classes/no/unique/ansatt

Here's my ansatt.xml in $CATALINA/localhost


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


SV: Setting up Wicket with Tomcat

Posted by Alexander Landsnes Keül <Al...@visma.no>.
I looked at that one, and for some reason my exact copy of the web.xml file wasn't exact enough. We're implementing wickets in another project, so setting up a new project wasn't practical. However good old copy-paste worked wonders.

Thanks :)

-----Opprinnelig melding-----
Fra: Igor Vaynberg [mailto:igor.vaynberg@gmail.com] 
Sendt: 30. oktober 2007 17:16
Til: users@wicket.apache.org
Emne: Re: Setting up Wicket with Tomcat

or just use the damn archetype to create a properly configured project
in the first place, thats why we have it... :)
http://wicket.apache.org/quickstart.html

-igor


On 10/30/07, Frank Bille <fr...@apache.org> wrote:
> On 10/30/07, Alexander Landsnes Keül <Al...@visma.no>
> wrote:
> >
> > <?xml version="1.0"?>
> > <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
> >         xmlns:xsi="http://www.w3.org/TR/xmlschema-1/"
> >         xsi:schemaLocation="
> > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
> >         version="2.4">
> >         <display-name>Ansatt</display-name>
> >         <filter>
> >                 <filter-name>WicketFilter</filter-name>
> >                 <filter-class>org.apache.wicket.protocol.http.WicketFilter
> > </filter-class>
> >                 <init-param>
> >                         <param-name>applicationClassName</param-name>
> >                         <param-value>
> > no.unique.ansatt.presentation.StartPage</param-value>
> >
>
> no.unique.ansatt.presentation.StartPage?
>
> Is this what you mean?
> Don't you mean something like:
>
> <init-param>
>     <param-name>applicationClassName</param-name>
>     <param-value>no.unique.ansatt.presentation.AnsattApplication
> </param-value>
> </init-param>
>
>
> I'm not entirely sure what you are asking about, but have Kent Tong has a
> free tutorial on setting up an environment with wicket, eclipse and tomcat:
> http://www.agileskills2.org/EWDW/index.html
>
> Frank
>

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


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


Re: Setting up Wicket with Tomcat

Posted by Igor Vaynberg <ig...@gmail.com>.
or just use the damn archetype to create a properly configured project
in the first place, thats why we have it... :)
http://wicket.apache.org/quickstart.html

-igor


On 10/30/07, Frank Bille <fr...@apache.org> wrote:
> On 10/30/07, Alexander Landsnes Keül <Al...@visma.no>
> wrote:
> >
> > <?xml version="1.0"?>
> > <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
> >         xmlns:xsi="http://www.w3.org/TR/xmlschema-1/"
> >         xsi:schemaLocation="
> > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
> >         version="2.4">
> >         <display-name>Ansatt</display-name>
> >         <filter>
> >                 <filter-name>WicketFilter</filter-name>
> >                 <filter-class>org.apache.wicket.protocol.http.WicketFilter
> > </filter-class>
> >                 <init-param>
> >                         <param-name>applicationClassName</param-name>
> >                         <param-value>
> > no.unique.ansatt.presentation.StartPage</param-value>
> >
>
> no.unique.ansatt.presentation.StartPage?
>
> Is this what you mean?
> Don't you mean something like:
>
> <init-param>
>     <param-name>applicationClassName</param-name>
>     <param-value>no.unique.ansatt.presentation.AnsattApplication
> </param-value>
> </init-param>
>
>
> I'm not entirely sure what you are asking about, but have Kent Tong has a
> free tutorial on setting up an environment with wicket, eclipse and tomcat:
> http://www.agileskills2.org/EWDW/index.html
>
> Frank
>

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


Re: Setting up Wicket with Tomcat

Posted by Frank Bille <fr...@apache.org>.
On 10/30/07, Alexander Landsnes Keül <Al...@visma.no>
wrote:
>
> <?xml version="1.0"?>
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>         xmlns:xsi="http://www.w3.org/TR/xmlschema-1/"
>         xsi:schemaLocation="
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>         version="2.4">
>         <display-name>Ansatt</display-name>
>         <filter>
>                 <filter-name>WicketFilter</filter-name>
>                 <filter-class>org.apache.wicket.protocol.http.WicketFilter
> </filter-class>
>                 <init-param>
>                         <param-name>applicationClassName</param-name>
>                         <param-value>
> no.unique.ansatt.presentation.StartPage</param-value>
>

no.unique.ansatt.presentation.StartPage?

Is this what you mean?
Don't you mean something like:

<init-param>
    <param-name>applicationClassName</param-name>
    <param-value>no.unique.ansatt.presentation.AnsattApplication
</param-value>
</init-param>


I'm not entirely sure what you are asking about, but have Kent Tong has a
free tutorial on setting up an environment with wicket, eclipse and tomcat:
http://www.agileskills2.org/EWDW/index.html

Frank