You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Anatoly Kupriyanov <ka...@gmail.com> on 2008/11/17 18:41:13 UTC

Two wicket apps

I have two wicket apps: main site and admin site. I want to use them
both from one web.xml
I made:
	<filter>
		<filter-name>wicket</filter-name>
		<filter-class>
			org.apache.wicket.protocol.http.WicketFilter
		</filter-class>
		<init-param>
			<param-name>applicationFactoryClassName</param-name>
			<param-value>
				org.apache.wicket.spring.SpringWebApplicationFactory
			</param-value>
		</init-param>
		<init-param>
			<param-name>applicationBean</param-name>
			<param-value>wicketApplication</param-value>
		</init-param>
	</filter>

	<filter>
		<filter-name>wicketAdmin</filter-name>
		<filter-class>
			org.apache.wicket.protocol.http.WicketFilter
		</filter-class>
		<init-param>
			<param-name>applicationFactoryClassName</param-name>
			<param-value>
				org.apache.wicket.spring.SpringWebApplicationFactory
			</param-value>
		</init-param>
		<init-param>
			<param-name>applicationBean</param-name>
			<param-value>wicketAdminApplication</param-value>
		</init-param>
	</filter>
...
	<filter-mapping>
		<filter-name>wicketAdmin</filter-name>
		<url-pattern>/admin/*</url-pattern>
	</filter-mapping>
	<filter-mapping>
		<filter-name>wicket</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>

all works fine, except mounted pages. In admin application I'll do
mountBookmarkablePage("thePage",  ThePage.class) and I get wicket 404
error: NOT_FOUND RequestURI=/site/admin/thePage. As I understand, the
wicket "mounter" expects the page mounted on "admin/thePage", but not
just "thePage". What can I do to avoid explicit url-pattern mapping
part in mounted page url?

-- 
WBR, kan.

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


Re: Two wicket apps

Posted by kan <ka...@gmail.com>.
Any ideas on it?

 Yet another question. In my admin application I want to have a link
 "show client screens". The link must follow to the main site with a
 client already signed it (in other words the WebSession, but from
different app is set to hold
 chosen client id). What is a way to do it?

-- 
WBR, kan.

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


Re: Two wicket apps

Posted by Anatoly Kupriyanov <ka...@gmail.com>.
Oh. It all works fine! My problem was: I've mounted page as
mountBookmarkablePage("signIn", SignIn.class)
and I have "case insensitive mounts" setting.
And seems there is a BUG in
AbstractRequestTargetUrlCodingStrategy.matches, it doesn't lowercase
the mountPath and as results doesn't match with url like "signIn"
(however this is my "home page" and wicket redirects to this url).
Is it really bug or am I doing something wrong?

Yet another question. In my admin application I want to have a link
"show client screens". The link must follow to the main site with a
client already signed it (in other words the WebSession is set to hold
choosen client id). What is a way to do it?

2008/11/18 Anatoly Kupriyanov <ka...@gmail.com>:
> As I see it uses Portlet. Is it only way?
> And as I understand it mounts the portlet on "examples" url and all
> other are subfolders of it. But I need main application on root and
> only one subfolder to admin application.
>
> 2008/11/17 Igor Vaynberg <ig...@gmail.com>:
>> you have to tell the admin filter where it is mounted. see
>> wicket-examples - each example is a separate app and there mounts work
>> fine.
>>
>> -igor
>>
>> On Mon, Nov 17, 2008 at 9:41 AM, Anatoly Kupriyanov <ka...@gmail.com> wrote:
>>> I have two wicket apps: main site and admin site. I want to use them
>>> both from one web.xml
>>> I made:
>>>        <filter>
>>>                <filter-name>wicket</filter-name>
>>>                <filter-class>
>>>                        org.apache.wicket.protocol.http.WicketFilter
>>>                </filter-class>
>>>                <init-param>
>>>                        <param-name>applicationFactoryClassName</param-name>
>>>                        <param-value>
>>>                                org.apache.wicket.spring.SpringWebApplicationFactory
>>>                        </param-value>
>>>                </init-param>
>>>                <init-param>
>>>                        <param-name>applicationBean</param-name>
>>>                        <param-value>wicketApplication</param-value>
>>>                </init-param>
>>>        </filter>
>>>
>>>        <filter>
>>>                <filter-name>wicketAdmin</filter-name>
>>>                <filter-class>
>>>                        org.apache.wicket.protocol.http.WicketFilter
>>>                </filter-class>
>>>                <init-param>
>>>                        <param-name>applicationFactoryClassName</param-name>
>>>                        <param-value>
>>>                                org.apache.wicket.spring.SpringWebApplicationFactory
>>>                        </param-value>
>>>                </init-param>
>>>                <init-param>
>>>                        <param-name>applicationBean</param-name>
>>>                        <param-value>wicketAdminApplication</param-value>
>>>                </init-param>
>>>        </filter>
>>> ...
>>>        <filter-mapping>
>>>                <filter-name>wicketAdmin</filter-name>
>>>                <url-pattern>/admin/*</url-pattern>
>>>        </filter-mapping>
>>>        <filter-mapping>
>>>                <filter-name>wicket</filter-name>
>>>                <url-pattern>/*</url-pattern>
>>>        </filter-mapping>
>>>
>>> all works fine, except mounted pages. In admin application I'll do
>>> mountBookmarkablePage("thePage",  ThePage.class) and I get wicket 404
>>> error: NOT_FOUND RequestURI=/site/admin/thePage. As I understand, the
>>> wicket "mounter" expects the page mounted on "admin/thePage", but not
>>> just "thePage". What can I do to avoid explicit url-pattern mapping
>>> part in mounted page url?
>>>
>>> --
>>> WBR, kan.
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
>
>
> --
> WBR, kan.
>



-- 
WBR, kan.

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


Re: Two wicket apps

Posted by Anatoly Kupriyanov <ka...@gmail.com>.
As I see it uses Portlet. Is it only way?
And as I understand it mounts the portlet on "examples" url and all
other are subfolders of it. But I need main application on root and
only one subfolder to admin application.

2008/11/17 Igor Vaynberg <ig...@gmail.com>:
> you have to tell the admin filter where it is mounted. see
> wicket-examples - each example is a separate app and there mounts work
> fine.
>
> -igor
>
> On Mon, Nov 17, 2008 at 9:41 AM, Anatoly Kupriyanov <ka...@gmail.com> wrote:
>> I have two wicket apps: main site and admin site. I want to use them
>> both from one web.xml
>> I made:
>>        <filter>
>>                <filter-name>wicket</filter-name>
>>                <filter-class>
>>                        org.apache.wicket.protocol.http.WicketFilter
>>                </filter-class>
>>                <init-param>
>>                        <param-name>applicationFactoryClassName</param-name>
>>                        <param-value>
>>                                org.apache.wicket.spring.SpringWebApplicationFactory
>>                        </param-value>
>>                </init-param>
>>                <init-param>
>>                        <param-name>applicationBean</param-name>
>>                        <param-value>wicketApplication</param-value>
>>                </init-param>
>>        </filter>
>>
>>        <filter>
>>                <filter-name>wicketAdmin</filter-name>
>>                <filter-class>
>>                        org.apache.wicket.protocol.http.WicketFilter
>>                </filter-class>
>>                <init-param>
>>                        <param-name>applicationFactoryClassName</param-name>
>>                        <param-value>
>>                                org.apache.wicket.spring.SpringWebApplicationFactory
>>                        </param-value>
>>                </init-param>
>>                <init-param>
>>                        <param-name>applicationBean</param-name>
>>                        <param-value>wicketAdminApplication</param-value>
>>                </init-param>
>>        </filter>
>> ...
>>        <filter-mapping>
>>                <filter-name>wicketAdmin</filter-name>
>>                <url-pattern>/admin/*</url-pattern>
>>        </filter-mapping>
>>        <filter-mapping>
>>                <filter-name>wicket</filter-name>
>>                <url-pattern>/*</url-pattern>
>>        </filter-mapping>
>>
>> all works fine, except mounted pages. In admin application I'll do
>> mountBookmarkablePage("thePage",  ThePage.class) and I get wicket 404
>> error: NOT_FOUND RequestURI=/site/admin/thePage. As I understand, the
>> wicket "mounter" expects the page mounted on "admin/thePage", but not
>> just "thePage". What can I do to avoid explicit url-pattern mapping
>> part in mounted page url?
>>
>> --
>> WBR, kan.
>>
>> ---------------------------------------------------------------------
>> 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
>
>



-- 
WBR, kan.

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


Re: Two wicket apps

Posted by Igor Vaynberg <ig...@gmail.com>.
you have to tell the admin filter where it is mounted. see
wicket-examples - each example is a separate app and there mounts work
fine.

-igor

On Mon, Nov 17, 2008 at 9:41 AM, Anatoly Kupriyanov <ka...@gmail.com> wrote:
> I have two wicket apps: main site and admin site. I want to use them
> both from one web.xml
> I made:
>        <filter>
>                <filter-name>wicket</filter-name>
>                <filter-class>
>                        org.apache.wicket.protocol.http.WicketFilter
>                </filter-class>
>                <init-param>
>                        <param-name>applicationFactoryClassName</param-name>
>                        <param-value>
>                                org.apache.wicket.spring.SpringWebApplicationFactory
>                        </param-value>
>                </init-param>
>                <init-param>
>                        <param-name>applicationBean</param-name>
>                        <param-value>wicketApplication</param-value>
>                </init-param>
>        </filter>
>
>        <filter>
>                <filter-name>wicketAdmin</filter-name>
>                <filter-class>
>                        org.apache.wicket.protocol.http.WicketFilter
>                </filter-class>
>                <init-param>
>                        <param-name>applicationFactoryClassName</param-name>
>                        <param-value>
>                                org.apache.wicket.spring.SpringWebApplicationFactory
>                        </param-value>
>                </init-param>
>                <init-param>
>                        <param-name>applicationBean</param-name>
>                        <param-value>wicketAdminApplication</param-value>
>                </init-param>
>        </filter>
> ...
>        <filter-mapping>
>                <filter-name>wicketAdmin</filter-name>
>                <url-pattern>/admin/*</url-pattern>
>        </filter-mapping>
>        <filter-mapping>
>                <filter-name>wicket</filter-name>
>                <url-pattern>/*</url-pattern>
>        </filter-mapping>
>
> all works fine, except mounted pages. In admin application I'll do
> mountBookmarkablePage("thePage",  ThePage.class) and I get wicket 404
> error: NOT_FOUND RequestURI=/site/admin/thePage. As I understand, the
> wicket "mounter" expects the page mounted on "admin/thePage", but not
> just "thePage". What can I do to avoid explicit url-pattern mapping
> part in mounted page url?
>
> --
> WBR, kan.
>
> ---------------------------------------------------------------------
> 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