If it should work with a regular portlet, then it should also work
with the Struts 2 portlet plugin. There's nothing special happening
inside the framework that should prevent this. You'd probably be
better off asking the question on a Spring or a Liferay mailing list.
Maybe this [1] thread is relevant?

Nils-H

[1] - 
http://www.liferay.com/web/guest/community/forums?p_p_id=19&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&_19_struts_action=%2Fmessage_boards%2Fview_message&_19_messageId=347191

On Fri, Aug 22, 2008 at 8:53 AM, Erik Mellegård
<[EMAIL PROTECTED]> wrote:
> Hi,
> I'v just started to implement a portlet application using 
> struts2-portlet-plugin
> and struts2-spring plugin. To manage my objects I'm planning to use spring 
> 2.5. My
> problem starts when using the scopes "session" and "request" on my spring 
> managed beans.
> I get the following error despite configurating RequestContextListener in 
> web.xml:
>
> 13:57:50,724 ERROR [jsp:52] java.lang.IllegalStateException: No thread-bound 
> request found: Are you referring to request attributes outside of an actual 
> web request, or processing a request outside of the originally receiving 
> thread? If you are actually operating within a web request and still receive 
> this message, your code is probably running outside of 
> DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener 
> or RequestContextFilter to expose the current request.
>        at 
> com.opensymphony.xwork2.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:126)
>        at 
> com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:143)
>        at 
> com.opensymphony.xwork2.ObjectFactory.buildAction(ObjectFactory.java:113)
>        at 
> com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:275)
>        at 
> com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:365)
>        at 
> com.opensymphony.xwork2.DefaultActionInvocation.access$000(DefaultActionInvocation.java:38)
>        at 
> com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:83)
>        at 
> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
>        at 
> com.opensymphony.xwork2.DefaultActionInvocation.<init>(DefaultActionInvocation.java:74)
>        at 
> com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:189)
>        at 
> org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41)
>        at 
> org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:34)
>        at 
> org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher.serviceAction(Jsr168Dispatcher.java:415)
>        at 
> org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher.render(Jsr168Dispatcher.java:299)
>        at 
> com.sun.portal.portletcontainer.appengine.filter.FilterChainImpl.doFilter(FilterChainImpl.java:121)
>        at 
> com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:69)
>        at 
> com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:96)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>        at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>        at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
> Am I missing something? Doesn't the struts2-spring plugin work within a portal
> environment? When running in a web application it works, and when changing my
> beans scope to "factory" socpe my configuration work in the portal.
>
> Best regards
> Erik Mellegård
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to