Like this?
<?xml version="1.0" encoding="ISO-8859-1"?>
<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>myproject</display-name>
<filter>
<filter-name>wicket.myproject</filter-name>
<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class
>
<init-param>
<param-name>applicationClassName</param-name>
<param-value>com.mycompany.WicketApplication</param-value>
</init-param>
<init-param>
<param-name>filterMappingUrlPattern</param-name>
<param-value>/test/*</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>wicket.myproject</filter-name>
<url-pattern>/test/*</url-pattern>
</filter-mapping>
</web-app>
-----Original Message-----
From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
Sent: Friday, June 13, 2008 2:45 PM
To: [email protected]
Subject: Re: Wicket 1.2 -> 1.3 upgrade question
the filter itself takes a configuration param where you have to repeat
the mapping...
class WicketFilter {
/**
* The name of the root path parameter that specifies the root
dir of the app.
*/
public static final String FILTER_MAPPING_PARAM =
"filterMappingUrlPattern";
String filterMapping =
filterConfig.getInitParameter(WicketFilter.FILTER_MAPPING_PARAM);
}
-igor
On Fri, Jun 13, 2008 at 11:09 AM, Frank Silbermann
<[EMAIL PROTECTED]> wrote:
> Yes, there is a <filter-mapping> element that maps <filter-name> to
> <url-pattern>.
>
> However, as I mentioned in
> http://www.nabble.com/Re%3A-%28Class%3C--extends-Page%3C-%3E%3E%29-cas
> ti ng-troubles-td17640954i40.html#a17824049, when I changed the
> <url-pattern> from "/*" to "/something/*" -- my static images
> (referenced by the HTML such as
>
> < img wicket:id="picture" src="image1.png" alt="Picture"/ >
>
> where "image1.png" was set via AttributeModifyer) no longer appeared.
>
> That suggested to me that perhaps I wasn't supposed to change the
> <url-pattern> of the filter. Should I submit this as a JIRA issue?
>
> -----Original Message-----
> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 13, 2008 12:53 PM
> To: [email protected]
> Subject: Re: Wicket 1.2 -> 1.3 upgrade question
>
> you have to give the mapping as a config param to the filter also, i
> forget the exact name right now...
>
> -igor
>
> On Fri, Jun 13, 2008 at 10:00 AM, Frank Silbermann
> <[EMAIL PROTECTED]> wrote:
>> Wicket 1.3 is configured as a filter rather than as a servlet. The
>> Quickstart shows a filter whose URL-PATTERN is "/*".
>>
>> The project that I wish to upgrade contains two Wicket 1.2
>> application
>
>> servlets (two different home-pages accessed via different URLs), and
>> one plain-vanilla non-Wicket servlet. They are deployed together
>> because they share the same code-base.
>>
>> This is my Wicket 1.2 project's web.xml file. How do I do this sort
>> of thing in Wicket 1.3?
>>
>> <?xml version="1.0" encoding="UTF-8"?> <web-app
>> xmlns="http://java.sun.com/xml/ns/j2ee
>> <http://java.sun.com/xml/ns/j2ee> "
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
>> <http://www.w3.org/2001/XMLSchema-instance> "
>> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>> <http://java.sun.com/xml/ns/j2ee>
>> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd
>> <http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd> " version="2.4">
>> <display-name>MEMSpssWebModule</display-name>
>> <context-param>
>> <param-name>configuration</param-name>
>> <param-value>development</param-value>
>> </context-param>
>> <servlet>
>> <servlet-name>MEM_Application</servlet-name>
>> <servlet-class>wicket.protocol.http.WicketServlet</servlet-class>
>> <init-param>
>> <param-name>applicationClassName</param-name>
>> <param-value>mem.MEM_Application</param-value>
>> </init-param>
>> <load-on-startup>1</load-on-startup>
>> </servlet>
>> <servlet-mapping>
>> <servlet-name>MEM_Application</servlet-name>
>> <url-pattern>/mem/*</url-pattern>
>> </servlet-mapping>
>>
>> <servlet>
>> <servlet-name>MEMTestApplication</servlet-name>
>> <servlet-class>wicket.protocol.http.WicketServlet</servlet-class>
>> <init-param>
>> <param-name>applicationClassName</param-name>
>> <param-value>mem.TestApplication</param-value>
>> </init-param>
>> <load-on-startup>1</load-on-startup>
>> </servlet>
>> <servlet-mapping>
>> <servlet-name>MEMTestApplication</servlet-name>
>> <url-pattern>/MEMTest/*</url-pattern>
>> </servlet-mapping>
>>
>>
>> <servlet>
>> <servlet-name>trackingnumbers</servlet-name>
>> <servlet-class>mem.TrackingNumbers</servlet-class>
>> </servlet>
>> <servlet-mapping>
>> <servlet-name>trackingnumbers</servlet-name>
>> <url-pattern>/trackingnumbers</url-pattern>
>> </servlet-mapping>
>>
>> <resource-ref>
>> <description>Resource reference to a factory for
> java.sql.Connection
>> instances that may be used for talking to a particular
>> database that is configured in the server.xml
file.</description>
>> <res-ref-name>jdbc/database</res-ref-name>
>> <res-type>javax.sql.DataSource</res-type>
>> <res-auth>Container</res-auth>
>> </resource-ref>
>> </web-app>
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]