You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by fstof <fr...@gmail.com> on 2010/12/01 09:19:32 UTC

Multiple wicket applications in a single WAR

Hi

I have a web app where clients can log in as well as third party users.

To do this I implemented 2 wicket applications (both extending
AuthenticatedWebApplication) to keep the authentication and sessions
separate from each other.

The two are separated in web.xml with separate servlet mappings like so:

<servlet>
  <servlet-name>wicket.servlet</servlet-name>
 
<servlet-class>org.apache.wicket.protocol.http.WicketServlet</servlet-class>
  <init-param>
    <param-name>applicationClassName</param-name>
    <param-value>za.co.MyNormalWebApplication</param-value>
  </init-param>
</servlet>
<servlet>
  <servlet-name>wicket.servlet.thirdParty</servlet-name>
 
<servlet-class>org.apache.wicket.protocol.http.WicketServlet</servlet-class>
  <init-param>
    <param-name>applicationClassName</param-name>
    <param-value>za.co.MyThirdPartyWebApplication</param-value>
  </init-param>
</servlet>
<servlet-mapping>
  <servlet-name>wicket.servlet</servlet-name>
  <url-pattern>/app/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
  <servlet-name>wicket.servlet.thirdParty</servlet-name>
  <url-pattern>/thirdParty/*</url-pattern>
</servlet-mapping>

It all works fine and I am happy with how It works

But for some wierd reason wicket gets confused. It starts mapping
incorrectly, and if I come in on /app it serves up the third party
application/session/login screen and vice versa

This happens with no apparent reason and once its stars doing it, it doesn't
stop. So the app will work fine for days, with no issues, then out of the
blue it starts doing it and only recovers after a server restart

We are running WebSphere Application Server 6.1


-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Multiple-wicket-applications-in-a-single-WAR-tp3066793p3066793.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Multiple wicket applications in a single WAR

Posted by Igor Vaynberg <ig...@gmail.com>.
a reproducible test case :)

-igor

On Wed, Dec 8, 2010 at 3:53 PM, fstof <fr...@gmail.com> wrote:
>
> Okay well I've given everything that I can.
> Please tell me what you need to be able to assist, and I'll do my best to
> get it for you
>
>
>
>
> Igor Vaynberg-2 wrote:
>>
>> impossible to help you since you have given us no information to go
>> on. all i can say is that having multiple applications in a single war
>> is fine, this is how wicket-examples project is structured and it
>> works fine.
>>
>> good luck.
>>
>> -igor
>>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Multiple-wicket-applications-in-a-single-WAR-tp3066793p3078234.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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: Multiple wicket applications in a single WAR

Posted by fstof <fr...@gmail.com>.
Okay well I've given everything that I can.
Please tell me what you need to be able to assist, and I'll do my best to
get it for you




Igor Vaynberg-2 wrote:
> 
> impossible to help you since you have given us no information to go
> on. all i can say is that having multiple applications in a single war
> is fine, this is how wicket-examples project is structured and it
> works fine.
> 
> good luck.
> 
> -igor
> 


-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Multiple-wicket-applications-in-a-single-WAR-tp3066793p3078234.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Multiple wicket applications in a single WAR

Posted by Igor Vaynberg <ig...@gmail.com>.
impossible to help you since you have given us no information to go
on. all i can say is that having multiple applications in a single war
is fine, this is how wicket-examples project is structured and it
works fine.

good luck.

-igor

On Wed, Dec 8, 2010 at 3:38 PM, fstof <fr...@gmail.com> wrote:
>
>
>
>
> BUMP...
>
>
> Anyone?  we run wicket 1.4.9
>
>
> fstof wrote:
>>
>> Hi
>>
>> I have a web app where clients can log in as well as third party users.
>>
>> To do this I implemented 2 wicket applications (both extending
>> AuthenticatedWebApplication) to keep the authentication and sessions
>> separate from each other.
>>
>> The two are separated in web.xml with separate servlet mappings like so:
>>
>> <servlet>
>>   <servlet-name>wicket.servlet</servlet-name>
>>
>> <servlet-class>org.apache.wicket.protocol.http.WicketServlet</servlet-class>
>>   <init-param>
>>     <param-name>applicationClassName</param-name>
>>     <param-value>za.co.MyNormalWebApplication</param-value>
>>   </init-param>
>> </servlet>
>> <servlet>
>>   <servlet-name>wicket.servlet.thirdParty</servlet-name>
>>
>> <servlet-class>org.apache.wicket.protocol.http.WicketServlet</servlet-class>
>>   <init-param>
>>     <param-name>applicationClassName</param-name>
>>     <param-value>za.co.MyThirdPartyWebApplication</param-value>
>>   </init-param>
>> </servlet>
>> <servlet-mapping>
>>   <servlet-name>wicket.servlet</servlet-name>
>>   <url-pattern>/app/*</url-pattern>
>> </servlet-mapping>
>> <servlet-mapping>
>>   <servlet-name>wicket.servlet.thirdParty</servlet-name>
>>   <url-pattern>/thirdParty/*</url-pattern>
>> </servlet-mapping>
>>
>> It all works fine and I am happy with how It works
>>
>> But for some wierd reason wicket gets confused. It starts mapping
>> incorrectly, and if I come in on /app it serves up the third party
>> application/session/login screen and vice versa
>>
>> This happens with no apparent reason and once its stars doing it, it
>> doesn't stop. So the app will work fine for days, with no issues, then out
>> of the blue it starts doing it and only recovers after a server restart
>>
>> We are running WebSphere Application Server 6.1
>>
>>
>>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Multiple-wicket-applications-in-a-single-WAR-tp3066793p3078212.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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: SV: Multiple wicket applications in a single WAR

Posted by fstof <fr...@gmail.com>.

Reinhard Nägele wrote:
> 
> I don't think it is a good idea to have multiple applications in one 
> war.
> 
Well according to Igor It's not an issue, as wicket-examples makes use of
it. Although it does not use the Servlet but rather the Filter, (don't know
if that could make a difference)


Reinhard Nägele wrote:
> 
> All apps in the same war share the same ClassLoader and thus the 
> same static ThreadLocal instances.
> 
The point of ThreadLocal is that whatever object is stored in it is only
"static" within that thread


Reinhard Nägele wrote:
> 
> There might be circumstances when the state somehow gets messed up.
> 
This I know happens (in our case) but what are the "circumstances"? thats
what I want to get to


-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Multiple-wicket-applications-in-a-single-WAR-tp3066793p3081608.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: SV: SV: Multiple wicket applications in a single WAR

Posted by fstof <fr...@gmail.com>.

Wilhelmsen Tor Iver wrote:
> 
> The ThreadLocal objects are static, yes, but the actual objects stored
> there are per thread and thus not static. 
> 
My thoughts exactly


Wilhelmsen Tor Iver wrote:
> 
> The Application instance is shared between all users, but in this case
> there is no user state in it, the difference is which Session class is
> used for factorizing the user Session, and which Pages are mounted (again,
> for factory purposes).
> 
I'm not sure what exactly it is you are asking...?

I have a bunch of pages mounted(loging pages for both applications) in my
base abstract Application class's init() so both my sub Applications mount
the same pages... (could this be it?)

Also both my Application implementations specify their own home pages and
sign in pages

Could there be something wrong in my sessions?

I thought it might be some static/synchronisation issue

-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Multiple-wicket-applications-in-a-single-WAR-tp3066793p3081633.html
Sent from the Users forum mailing list archive at Nabble.com.

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


SV: SV: Multiple wicket applications in a single WAR

Posted by Wilhelmsen Tor Iver <To...@arrive.no>.
> I don't think it is a good idea to have multiple applications in one
> war. Wicket stores static state in ThreadLocals (Application, Session,
> etc.).

The ThreadLocal objects are static, yes, but the actual objects stored there are per thread and thus not static. 

> All apps in the same war share the same ClassLoader and thus the
> same static ThreadLocal instances. There might be circumstances when the
> state somehow gets messed up.

If one thread can get at objects belonging to a different thread that would not be a "circumstance" but "a serious bug".

> I'm sure this is the source of your
> problems. So, either go for one app for all users or create two separate
> war files.

The Application instance is shared between all users, but in this case there is no user state in it, the difference is which Session class is used for factorizing the user Session, and which Pages are mounted (again, for factory purposes).

- Tor Iver

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


Re: SV: Multiple wicket applications in a single WAR

Posted by Reinhard Nägele <re...@mgm-tp.com>.
I don't think it is a good idea to have multiple applications in one 
war. Wicket stores static state in ThreadLocals (Application, Session, 
etc.). All apps in the same war share the same ClassLoader and thus the 
same static ThreadLocal instances. There might be circumstances when the 
state somehow gets messed up. I'm sure this is the source of your 
problems. So, either go for one app for all users or create two separate 
war files.

Reinhard


Am 10.12.2010 07:07, schrieb fstof:
> Oh and I excluded the session code for the simple reason, that I dont think
> it is relevant, as it is the applications that get mixed up
>
>
> fstof wrote:
>>
>> Igor Vaynberg-2 wrote:
>>>
>>> a reproducible test case :)
>>>
>>> -igor
>>>
>>>
>> If I could reproduce it I'm pretty sure I would have been able to solve it
>> :) The thing is It happens like once a week, and we have not seen it
>> happen in any of our DEV/PRE environments
>>
>>
>>
>>
>>
>> Zilvinas Vilutis wrote:
>>>
>>> 1. No one will steal your non-working code - that's for sure :)
>>>
>>> 2. Try to explain the scenario in more details. Are you using Spring
>>>
>>> Security or just wicket? What brings you to the app after login -
>>>
>>> component.continueToOriginalDestination() ?
>>>
>>>
>> 1. Steeling my code is the least of my problems :)
>>
>> 2. We are not using spring at all, Only wicket-auth-roles.
>> (AuthenticatedWebApplication / AuthenticatedWebSession)
>>
>>
>>
>> When loading the app in the browser it loads the HomePage /
>> ThirdPartyHomePage. Both of these have the annotation
>> @AuthorizeInstantiation("user") which causes the redirecting the the
>> SignInPage / SignInThirdPartyPage
>> And that is exactly where it goes pear shaped.
>> When calling the mapping for the one Application
>> (MMSAHealthWebApplication) it would load the page SignInThirdPartyPage
>> which belongs to the other app
>>
>> So I'll add some more code...
>>
>>
>>
>> 1. We have a base Application class:
>>
>>
>> public abstract class MMSAAbstractWebApplication extends
>> AuthenticatedWebApplication {
>>
>> 	private static Logger log =
>> LoggerFactory.getLogger(MMSAAbstractWebApplication.class);
>>
>> 	protected void init() {
>> 		log.info("initialising application");
>> 		super.init();
>>
>> 		// Get the logger
>> 		IRequestLoggerSettings reqLogger =
>> Application.get().getRequestLoggerSettings();
>> 		// Enable the logger
>> 		reqLogger.setRequestLoggerEnabled(true);
>>
>> 		getRequestCycleSettings().setRenderStrategy(Settings.ONE_PASS_RENDER);
>>
>> 		mountPages();
>> 	}
>>
>> 	private void mountPages() {
>> 		mountBookmarkablePage("/registration", RegistrationPage.class);
>> 		...
>> 	}
>> }
>>
>> 2. Then we have 2 subclasses (these are the ones mapped in web.xml)
>>
>> public class MMSAHealthWebApplication extends MMSAAbstractWebApplication {
>> 	private static Logger log =
>> LoggerFactory.getLogger(MMSAHealthWebApplication.class);
>>
>> 	@Override
>> 	protected Class<? extends AuthenticatedWebSession>  getWebSessionClass() {
>> 		return MMSAHealthWebSession.class;
>> 	}
>>
>> 	protected Class<? extends WebPage>  getSignInPageClass() {
>> 		return SignInPage.class;
>> 	}
>>
>> 	public Class<? extends WebPage>  getHomePage() {
>> 		return HomePage.class;
>> 	}
>>
>> 	protected void init() {
>> 		log.info("initialising application");
>> 		super.init();
>> 	}
>> }
>> And
>> public class MMSAThirdPartyWebApplication extends
>> MMSAAbstractWebApplication {
>> 	private static Logger log =
>> LoggerFactory.getLogger(MMSAThirdPartyWebApplication.class);
>>
>> 	@Override
>> 	protected Class<? extends AuthenticatedWebSession>  getWebSessionClass() {
>> 		return MMSAThirdPartyWebSession.class;
>> 	}
>>
>> 	protected Class<? extends WebPage>  getSignInPageClass() {
>> 		return SignInThirdPartyPage.class;
>> 	}
>>
>> 	public Class<? extends WebPage>  getHomePage() {
>> 		return ThirdPartyHomePage.class;
>> 	}
>>
>> 	protected void init() {
>> 		log.info("initialising application");
>> 		super.init();
>> 	}
>> }
>>


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


Re: SV: Multiple wicket applications in a single WAR

Posted by fstof <fr...@gmail.com>.
Oh and I excluded the session code for the simple reason, that I dont think
it is relevant, as it is the applications that get mixed up


fstof wrote:
> 
> 
> Igor Vaynberg-2 wrote:
>> 
>> 
>> a reproducible test case :)
>> 
>> -igor
>> 
>> 
> 
> If I could reproduce it I'm pretty sure I would have been able to solve it
> :) The thing is It happens like once a week, and we have not seen it
> happen in any of our DEV/PRE environments
> 
> 
> 
> 
> 
> Zilvinas Vilutis wrote:
>> 
>> 
>> 1. No one will steal your non-working code - that's for sure :)
>> 
>> 2. Try to explain the scenario in more details. Are you using Spring
>> 
>> Security or just wicket? What brings you to the app after login -
>> 
>> component.continueToOriginalDestination() ?
>> 
>> 
> 
> 1. Steeling my code is the least of my problems :) 
> 
> 2. We are not using spring at all, Only wicket-auth-roles.
> (AuthenticatedWebApplication / AuthenticatedWebSession)
> 
> 
> 
> When loading the app in the browser it loads the HomePage /
> ThirdPartyHomePage. Both of these have the annotation
> @AuthorizeInstantiation("user") which causes the redirecting the the
> SignInPage / SignInThirdPartyPage
> And that is exactly where it goes pear shaped.
> When calling the mapping for the one Application
> (MMSAHealthWebApplication) it would load the page SignInThirdPartyPage
> which belongs to the other app
> 
> So I'll add some more code...
> 
> 
> 
> 1. We have a base Application class:
> 
> 
> public abstract class MMSAAbstractWebApplication extends
> AuthenticatedWebApplication {
> 
> 	private static Logger log =
> LoggerFactory.getLogger(MMSAAbstractWebApplication.class);
> 
> 	protected void init() {
> 		log.info("initialising application");
> 		super.init();
> 
> 		// Get the logger
> 		IRequestLoggerSettings reqLogger =
> Application.get().getRequestLoggerSettings();
> 		// Enable the logger
> 		reqLogger.setRequestLoggerEnabled(true);
> 
> 		getRequestCycleSettings().setRenderStrategy(Settings.ONE_PASS_RENDER);
> 
> 		mountPages();
> 	}
> 
> 	private void mountPages() {
> 		mountBookmarkablePage("/registration", RegistrationPage.class);
> 		...
> 	}
> }
> 
> 2. Then we have 2 subclasses (these are the ones mapped in web.xml)
> 
> public class MMSAHealthWebApplication extends MMSAAbstractWebApplication {
> 	private static Logger log =
> LoggerFactory.getLogger(MMSAHealthWebApplication.class);
> 
> 	@Override
> 	protected Class<? extends AuthenticatedWebSession> getWebSessionClass() {
> 		return MMSAHealthWebSession.class;
> 	}
> 
> 	protected Class<? extends WebPage> getSignInPageClass() {
> 		return SignInPage.class;
> 	}
> 
> 	public Class<? extends WebPage> getHomePage() {
> 		return HomePage.class;
> 	}
> 
> 	protected void init() {
> 		log.info("initialising application");
> 		super.init();
> 	}
> }
> And
> public class MMSAThirdPartyWebApplication extends
> MMSAAbstractWebApplication {
> 	private static Logger log =
> LoggerFactory.getLogger(MMSAThirdPartyWebApplication.class);
> 
> 	@Override
> 	protected Class<? extends AuthenticatedWebSession> getWebSessionClass() {
> 		return MMSAThirdPartyWebSession.class;
> 	}
> 
> 	protected Class<? extends WebPage> getSignInPageClass() {
> 		return SignInThirdPartyPage.class;
> 	}
> 
> 	public Class<? extends WebPage> getHomePage() {
> 		return ThirdPartyHomePage.class;
> 	}
> 
> 	protected void init() {
> 		log.info("initialising application");
> 		super.init();
> 	}
> }
> 

-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Multiple-wicket-applications-in-a-single-WAR-tp3066793p3081431.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: SV: Multiple wicket applications in a single WAR

Posted by fstof <fr...@gmail.com>.

Igor Vaynberg-2 wrote:
> 
> 
> a reproducible test case :)
> 
> -igor
> 
> 

If I could reproduce it I'm pretty sure I would have been able to solve it
:) The thing is It happens like once a week, and we have not seen it happen
in any of our DEV/PRE environments





Zilvinas Vilutis wrote:
> 
> 
> 1. No one will steal your non-working code - that's for sure :)
> 
> 2. Try to explain the scenario in more details. Are you using Spring
> 
> Security or just wicket? What brings you to the app after login -
> 
> component.continueToOriginalDestination() ?
> 
> 

1. Steeling my code is the least of my problems :) 

2. We are not using spring at all, Only wicket-auth-roles.
(AuthenticatedWebApplication / AuthenticatedWebSession)



When loading the app in the browser it loads the HomePage /
ThirdPartyHomePage. Both of these have the annotation
@AuthorizeInstantiation("user") which causes the redirecting the the
SignInPage / SignInThirdPartyPage
And that is exactly where it goes pear shaped.
When calling the mapping for the one Application (MMSAHealthWebApplication)
it would load the page SignInThirdPartyPage which belongs to the other app

So I'll add some more code...



1. We have a base Application class:


public abstract class MMSAAbstractWebApplication extends
AuthenticatedWebApplication {

	private static Logger log =
LoggerFactory.getLogger(MMSAAbstractWebApplication.class);

	protected void init() {
		log.info("initialising application");
		super.init();

		// Get the logger
		IRequestLoggerSettings reqLogger =
Application.get().getRequestLoggerSettings();
		// Enable the logger
		reqLogger.setRequestLoggerEnabled(true);

		getRequestCycleSettings().setRenderStrategy(Settings.ONE_PASS_RENDER);

		mountPages();
	}

	private void mountPages() {
		mountBookmarkablePage("/registration", RegistrationPage.class);
		...
	}
}

2. Then we have 2 subclasses (these are the ones mapped in web.xml)

public class MMSAHealthWebApplication extends MMSAAbstractWebApplication {
	private static Logger log =
LoggerFactory.getLogger(MMSAHealthWebApplication.class);

	@Override
	protected Class<? extends AuthenticatedWebSession> getWebSessionClass() {
		return MMSAHealthWebSession.class;
	}

	protected Class<? extends WebPage> getSignInPageClass() {
		return SignInPage.class;
	}

	public Class<? extends WebPage> getHomePage() {
		return HomePage.class;
	}

	protected void init() {
		log.info("initialising application");
		super.init();
	}
}
And
public class MMSAThirdPartyWebApplication extends MMSAAbstractWebApplication
{
	private static Logger log =
LoggerFactory.getLogger(MMSAThirdPartyWebApplication.class);

	@Override
	protected Class<? extends AuthenticatedWebSession> getWebSessionClass() {
		return MMSAThirdPartyWebSession.class;
	}

	protected Class<? extends WebPage> getSignInPageClass() {
		return SignInThirdPartyPage.class;
	}

	public Class<? extends WebPage> getHomePage() {
		return ThirdPartyHomePage.class;
	}

	protected void init() {
		log.info("initialising application");
		super.init();
	}
}
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Multiple-wicket-applications-in-a-single-WAR-tp3066793p3078310.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: SV: Multiple wicket applications in a single WAR

Posted by Zilvinas Vilutis <ci...@gmail.com>.
1. No one will steal your non-working code - that's for sure :)
2. Try to explain the scenario in more details. Are you using Spring
Security or just wicket? What brings you to the app after login -
component.continueToOriginalDestination() ?

Žilvinas Vilutis

Mobile:   (+370) 652 38353
E-mail:   cikasfm@gmail.com



On Wed, Dec 8, 2010 at 6:57 AM, fstof <fr...@gmail.com> wrote:
>
> That is what I noticed when I looked at the code, so I cant really tell why
> that could be an issue
>
> We are using WicketServlet because WebSphere 6.1 has issues with the filter
> (not 100% sure what the issue is, but it does not work with the filter)
>
>
> Wilhelmsen Tor Iver wrote:
>>
>> Any reason you use WicketServlet instead of WicketFilter? We use multiple
>> apps in a war and that works fine in the filter case. In fact it seems
>> that WicketServlet delegates to an internal WicketFilter anyway...
>>
>> - Tor Iver
>>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Multiple-wicket-applications-in-a-single-WAR-tp3066793p3078248.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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: SV: Multiple wicket applications in a single WAR

Posted by fstof <fr...@gmail.com>.
That is what I noticed when I looked at the code, so I cant really tell why
that could be an issue

We are using WicketServlet because WebSphere 6.1 has issues with the filter
(not 100% sure what the issue is, but it does not work with the filter)


Wilhelmsen Tor Iver wrote:
> 
> Any reason you use WicketServlet instead of WicketFilter? We use multiple
> apps in a war and that works fine in the filter case. In fact it seems
> that WicketServlet delegates to an internal WicketFilter anyway...
> 
> - Tor Iver
> 

-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Multiple-wicket-applications-in-a-single-WAR-tp3066793p3078248.html
Sent from the Users forum mailing list archive at Nabble.com.

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


SV: Multiple wicket applications in a single WAR

Posted by Wilhelmsen Tor Iver <To...@arrive.no>.
> BUMP...
> 
> 
> Anyone?  we run wicket 1.4.9

Any reason you use WicketServlet instead of WicketFilter? We use multiple apps in a war and that works fine in the filter case. In fact it seems that WicketServlet delegates to an internal WicketFilter anyway...

- Tor Iver

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


Re: Multiple wicket applications in a single WAR

Posted by fstof <fr...@gmail.com>.



BUMP...


Anyone?  we run wicket 1.4.9


fstof wrote:
> 
> Hi
> 
> I have a web app where clients can log in as well as third party users.
> 
> To do this I implemented 2 wicket applications (both extending
> AuthenticatedWebApplication) to keep the authentication and sessions
> separate from each other.
> 
> The two are separated in web.xml with separate servlet mappings like so:
> 
> <servlet>
>   <servlet-name>wicket.servlet</servlet-name>
>  
> <servlet-class>org.apache.wicket.protocol.http.WicketServlet</servlet-class>
>   <init-param>
>     <param-name>applicationClassName</param-name>
>     <param-value>za.co.MyNormalWebApplication</param-value>
>   </init-param>
> </servlet>
> <servlet>
>   <servlet-name>wicket.servlet.thirdParty</servlet-name>
>  
> <servlet-class>org.apache.wicket.protocol.http.WicketServlet</servlet-class>
>   <init-param>
>     <param-name>applicationClassName</param-name>
>     <param-value>za.co.MyThirdPartyWebApplication</param-value>
>   </init-param>
> </servlet>
> <servlet-mapping>
>   <servlet-name>wicket.servlet</servlet-name>
>   <url-pattern>/app/*</url-pattern>
> </servlet-mapping>
> <servlet-mapping>
>   <servlet-name>wicket.servlet.thirdParty</servlet-name>
>   <url-pattern>/thirdParty/*</url-pattern>
> </servlet-mapping>
> 
> It all works fine and I am happy with how It works
> 
> But for some wierd reason wicket gets confused. It starts mapping
> incorrectly, and if I come in on /app it serves up the third party
> application/session/login screen and vice versa
> 
> This happens with no apparent reason and once its stars doing it, it
> doesn't stop. So the app will work fine for days, with no issues, then out
> of the blue it starts doing it and only recovers after a server restart
> 
> We are running WebSphere Application Server 6.1
> 
> 
> 

-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Multiple-wicket-applications-in-a-single-WAR-tp3066793p3078212.html
Sent from the Users forum mailing list archive at Nabble.com.

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