struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Jose Fuentes Esteban <juanjose.fuen...@grupoica.com>
Subject RE: Struts 2 portlet - spring example- Liferay 6.1 GA 2
Date Thu, 25 Oct 2012 16:52:37 GMT
It's not that It is a real solution but a workaround... but this is what I
have done

I've extended StrutsSpringObjectFactory to allow this class to directly
create the WebApplicationContext. Of course this class has checks that
evaluate if there is a WebApplicationContext already created. Also, I
subclassed ContextLoaderListener to NOT create the context but to merely
hold a ContexLoader object, to be able to clean the ApplicationContext when
the servlet context is destroyed.

It's not an elegant way because it's very specific to this concrete
situation, but does  the trick.

Now I have problems with Spring web scopes in spring action beans (spring's
"request" , "session" bean scopes I mean) . It seems Spring's
RequestContextFilter doesn't fire... :(

-----Mensaje original-----
De: Martin Gainty [mailto:mgainty@hotmail.com]
Enviado el: jueves, 25 de octubre de 2012 16:50
Para: Struts Users Mailing List
Asunto: RE: Struts 2 portlet - spring example- Liferay 6.1 GA 2


Lukasz and team

Just a thought but in web.xml can you reorder the Struts Listener(s) to be
configured before Liferay (filters and listeners and servlets and taglibs)?

does this help?
Martin
______________________________________________
Note de déni et de confidentialité
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
destinataire prévu, nous te demandons avec bonté que pour satisfaire
informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
de ceci est interdite. Ce message sert à l'information seulement et n'aura
pas n'importe quel effet légalement obligatoire. Étant donné que les email
peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
aucune responsabilité pour le contenu fourni.


> From: lukaszlenart@apache.org
> Date: Thu, 25 Oct 2012 16:20:04 +0200
> Subject: Re: Struts 2 portlet - spring example- Liferay 6.1 GA 2
> To: user@struts.apache.org
>
> 2012/10/25 Juan Jose Fuentes Esteban <juanjose.fuentes@grupoica.com>:
> > Yes Lukasz, but it seems there is a problem in this specific version of
> > Liferay, as explained here:
> >
> > http://www.liferay.com/es/community/forums/-/message_boards/message/
> > 15705348
> >
> > In this release of Liferay, Portlets are initialized BEFORE servlet
> > listeners are executed. So, if using Struts Jsr286Dispatcher, the
> > StrutsSpringObjectFactory can't find a suitable WebApplicationContext
> > (that should have been initialized in the servlet context listener).
> >
> > In here, http://issues.liferay.com/browse/LPS-29103 , it is stated that
> > it is solved in a patch to the still not released Liferay 6.2.X,
> > although if you look at the comments, it still fails in something...
>
> So it's an issue with Lifray not with Struts 2 the Portlet Plugin
>
>
> Regards
> --
> Łukasz
> mobile +48 606 323 122 http://www.lenart.org.pl/ Warszawa JUG
> conference - Confitura http://confitura.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message