struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tracy12 <j_lal...@yahoo.com>
Subject Re: struts 2 portlet interceptor issue
Date Wed, 05 Aug 2009 02:11:53 GMT

Instead of writing interceptors I decided to go with the suggestion you made,
which is

use the raw session with the use of

<portlet:defineObjects/>


but what I want to know is how can I access the jsp expression variables
inside the <s:property and <s:if tags.

We primarily use struts tags, because of this I thought of use <s:set tag to
assign the portlet application scope variable and  use there after but it
failed pls see the below failed attempt.

<portlet:defineObjects/>


<%
UserSession userSession
=(UserSession)renderRequest.getPortletSession().getAttribute("UserSessionForApplication",PortletSession.APPLICATION_SCOPE);
String loginId= userSession.getLoginId();
%>


<s:set name="studentId" value="'<%=loginId%>'"  />
<s:set name="studentId2" value="#attri.loginId "  />




<s:property value="studentId"/> <br> 

<s:property value="studentId2"/> <br> 

none of the above printed the value, how to proceed on this

Note: UserSession is one of our custom classes





Nils-Helge Garli wrote:
> 
>>                <action name="testAction" class="test.MyAction">
>>                        <interceptor-ref
>> name="sessionScopeHandler"></interceptor-ref>
>>                        <result>/jsp/test/test.jsp</result>
>>                </action>
> 
> With this configuration, your sessionScopeHandler will be the only
> interceptor running for this action. You either need to include the
> portletDefaultStack or set up your own stack that also includes the
> framework interceptors that does the "introspection" magic.
> 
> Nils-H
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/struts-2-portlet-interceptor-issue-tp24799881p24819616.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Mime
View raw message