You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Stephen Turner <st...@MIT.EDU> on 2009/04/16 16:26:26 UTC

Struts 2 Portlet/Oracle Portal Problems

Hello all -

We've had some trouble using Struts 2 portlets (2.0.14) with Oracle  
Portal, and I wondered if anyone else had used this combination  
successfully.

The problems occur with portlets that have a form and submit buttons, and  
the issue seems to be that Struts uses render parameters to pass  
information (like action name) from the event phase to the render phase.  
Oracle Portal keeps these values in the generated URL for the form action,  
and so they persist for longer than Struts is expecting them to.

An aside - this is also an issue with straight JSR 168 portlets in the  
Oracle portal, but we can work around this by using session attributes to  
pass data from event to render, rather than render params. However, as  
Struts uses render params internally to figure out which action to invoke,  
there's no similar workaround for Struts. I suspect the problem is in the  
Oracle portal - the JSR 168 spec seems to indicate that render params are  
for passing data from event phase to render phase, but I wanted to see if  
anyone was aware of the issue and if there is a workaround. This all works  
perfectly when running in Pluto.

Here's an illustration of the problem - we are using a "redirectAction" to  
get from event to render.

I have a simple Struts action class "StrutsTest" which has these methods:

	public String execute();   // implements event phase processing
         public String doView();    // implements render phase processing

These methods do nothing except logging.

My form has a single text input field called "pie" and a single submit.  
Here's the relevant part of the struts config:

   <action name="init">
      <result name="success">/WEB-INF/view/index.jsp</result>
   </action>

   <action name="StrutsTestAction" class="struts2hello.StrutsTest">
    <result name="input">/WEB-INF/view/index.jsp</result>
    <result name="success" type="redirectAction" >
      <param name="actionName">StrutsTestRender</param>
      <param name="portletMode">view</param>
      <param name="pie">${pie}</param>
    </result>
   </action>

   <action name="StrutsTestRender" class="struts2hello.StrutsTest"  
method="doView">
    <result name="success">/WEB-INF/view/index.jsp</result>
   </action>

Here's what happens, step by step:

*** 1. First display. "init" action is invoked, which simply forwards to  
the jsp. The form action url has this in it:
     struts.portlet.action%3D%252Fview%252FStrutsTestAction%26struts.portlet.mode%3Dview

*** 2. I enter "apple" in the pie field and submit. The event phase mthod  
(execute) receives the value correctly and form is redisplayed .

Logging shows this:

2009-04-16 09:32:31,581 INFO struts2hello.StrutsTest.execute - Begin  
execute
2009-04-16 09:32:31,583 INFO struts2hello.StrutsTest.execute - End execute
2009-04-16 09:32:31,765 INFO struts2hello.StrutsTest.doView - Begin doView  
A. Pie = apple
2009-04-16 09:32:31,767 INFO struts2hello.StrutsTest.doView - doView B.  
Phase: RENDER
2009-04-16 09:32:31,768 INFO struts2hello.StrutsTest.doView - End doView

This is all correct - the event phase action is invoked, and then the  
render phase action (doView method) is invoked and the phase (from  
PortletActionContext) is RENDER.

But, on redisplay, the form action URL now has this embedded:

pie%3Dapple%26struts.portlet.action%3D%252Fview%252FStrutsTestRender%26struts.portlet.mode%3Dview%26struts.portlet.eventAction%3Dtrue

AND

struts.portlet.action%3D%252Fview%252FStrutsTestAction%26struts.portlet.mode%3Dview

I believe this is where things start to go wrong - Oracle has put the  
render parameters (action name of "StrutsTestRender" and pie of "apple")  
into the generated action url, and subsequent submits will see these  
parameters.

*** 3. Entering "cherry" into the pie field and submitting again shows  
this in the log:

2009-04-16 09:33:40,502 INFO struts2hello.StrutsTest.doView - Begin doView  
A. Pie = apple, cherry
2009-04-16 09:33:40,505 INFO struts2hello.StrutsTest.doView - doView B.  
Phase: EVENT
2009-04-16 09:33:40,508 INFO struts2hello.StrutsTest.doView - End doView

So we've now gone directly into the render method, but we're in the event  
phase. Presumably because of struts.portlet.action value of  
"StrutsTestRender" in the form's action URL.

Also we now have both "apple" and "cherry" in the "pie" parameter values:  
"apple" from being embedded in the URL, "cherry" from being entered in the  
form.



-- 
Stephen Turner
Senior Programmer/Analyst - SAIS
MIT IS&T

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


Re: Struts 2 Portlet/Oracle Portal Problems

Posted by Stephen Turner <st...@MIT.EDU>.
Hi Nils,

I haven't tried the Struts 2 sample, but I plan to. The Oracle Portal  
version is 10.1.4.2.0

Thanks,
Steve

On Sat, 18 Apr 2009 07:32:15 -0400, Nils-Helge Garli Hegvik  
<ni...@gmail.com> wrote:

> Have you tried deploying the Struts 2 sample app and see if it's the
> same problem there? And which version of Oracle Portal are you using?
>
> Nils-H
>

-- 
Stephen Turner
Senior Programmer/Analyst - SAIS
MIT IS&T

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


Re: Struts 2 Portlet/Oracle Portal Problems

Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
Have you tried deploying the Struts 2 sample app and see if it's the
same problem there? And which version of Oracle Portal are you using?

Nils-H

On Thu, Apr 16, 2009 at 11:44 PM, Nils-Helge Garli Hegvik
<ni...@gmail.com> wrote:
> Thanks. If they say it's not an Oracle problem, it would be great if
> you created a JIRA issue and attached a small example to reproduce the
> problem.
>
> Nils-H
>
> On Thu, Apr 16, 2009 at 9:17 PM, Stephen Turner <st...@mit.edu> wrote:
>>
>> On Thu, 16 Apr 2009 15:14:31 -0400, Nils-Helge Garli Hegvik
>> <ni...@gmail.com> wrote:
>>
>>> No, I didn't expect it to hel... But there was a bug with URLs and the
>>> includeParams attribute, although I don't think this is the same
>>> issue. Do you know if there's an official bug report for the render
>>> parameter behaviour?
>>>
>>> Nils-H
>>>
>>
>> No, I don't know if there's a bug report - but we have a contact for Oracle
>> support so I'm going to run it by them.
>>
>> Thanks for the help-
>>
>> Steve
>>
>> --
>> Stephen Turner
>> Senior Programmer/Analyst - SAIS
>> MIT IS&T
>>
>> ---------------------------------------------------------------------
>> 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


Re: Struts 2 Portlet/Oracle Portal Problems

Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
Thanks. If they say it's not an Oracle problem, it would be great if
you created a JIRA issue and attached a small example to reproduce the
problem.

Nils-H

On Thu, Apr 16, 2009 at 9:17 PM, Stephen Turner <st...@mit.edu> wrote:
>
> On Thu, 16 Apr 2009 15:14:31 -0400, Nils-Helge Garli Hegvik
> <ni...@gmail.com> wrote:
>
>> No, I didn't expect it to hel... But there was a bug with URLs and the
>> includeParams attribute, although I don't think this is the same
>> issue. Do you know if there's an official bug report for the render
>> parameter behaviour?
>>
>> Nils-H
>>
>
> No, I don't know if there's a bug report - but we have a contact for Oracle
> support so I'm going to run it by them.
>
> Thanks for the help-
>
> Steve
>
> --
> Stephen Turner
> Senior Programmer/Analyst - SAIS
> MIT IS&T
>
> ---------------------------------------------------------------------
> 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


Re: Struts 2 Portlet/Oracle Portal Problems

Posted by Stephen Turner <st...@MIT.EDU>.
On Thu, 16 Apr 2009 15:14:31 -0400, Nils-Helge Garli Hegvik  
<ni...@gmail.com> wrote:

> No, I didn't expect it to hel... But there was a bug with URLs and the
> includeParams attribute, although I don't think this is the same
> issue. Do you know if there's an official bug report for the render
> parameter behaviour?
>
> Nils-H
>

No, I don't know if there's a bug report - but we have a contact for  
Oracle support so I'm going to run it by them.

Thanks for the help-

Steve

-- 
Stephen Turner
Senior Programmer/Analyst - SAIS
MIT IS&T

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


Re: Struts 2 Portlet/Oracle Portal Problems

Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
No, I didn't expect it to hel... But there was a bug with URLs and the
includeParams attribute, although I don't think this is the same
issue. Do you know if there's an official bug report for the render
parameter behaviour?

Nils-H

On Thu, Apr 16, 2009 at 8:58 PM, Stephen Turner <st...@mit.edu> wrote:
> On Thu, 16 Apr 2009 14:02:31 -0400, Nils-Helge Garli Hegvik
> <ni...@gmail.com> wrote:
>
>> That does indeed seem a little odd... The portlet framework expects
>> these parameters, so I'm not sure there is a way around it. Did you
>> try upgrading to 2.1.6?
>>
>> Nils-H
>>
>
> I do suspect the Oracle portal is at fault - as I mentioned, straight JSR
> 168 portlets also cause a problem when using render params in the Oracle
> portal.
>
> I didn't think upgrading to 2.1.6 would help, but I tried anyway and am now
> getting a runtime exception:
>
> 09/04/16 14:41:40 struts2-hello: [id=75664163303,2] WARNING: Could not find
> action or result
> There is no Action mapped for action name WSRPBaseService. - [unknown
> location]
>
> We are accessing our portlets through WSRP - "WSRPBaseService" is used in
> the markup URL. No idea why this is being interpreted as a Struts action
> though!
>
> Steve
>
> --
> Stephen Turner
> Senior Programmer/Analyst - SAIS
> MIT IS&T
>
> ---------------------------------------------------------------------
> 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


Re: Struts 2 Portlet/Oracle Portal Problems

Posted by Stephen Turner <st...@MIT.EDU>.
On Thu, 16 Apr 2009 14:02:31 -0400, Nils-Helge Garli Hegvik  
<ni...@gmail.com> wrote:

> That does indeed seem a little odd... The portlet framework expects
> these parameters, so I'm not sure there is a way around it. Did you
> try upgrading to 2.1.6?
>
> Nils-H
>

I do suspect the Oracle portal is at fault - as I mentioned, straight JSR  
168 portlets also cause a problem when using render params in the Oracle  
portal.

I didn't think upgrading to 2.1.6 would help, but I tried anyway and am  
now getting a runtime exception:

09/04/16 14:41:40 struts2-hello: [id=75664163303,2] WARNING: Could not  
find action or result
There is no Action mapped for action name WSRPBaseService. - [unknown  
location]

We are accessing our portlets through WSRP - "WSRPBaseService" is used in  
the markup URL. No idea why this is being interpreted as a Struts action  
though!

Steve

-- 
Stephen Turner
Senior Programmer/Analyst - SAIS
MIT IS&T

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


Re: Struts 2 Portlet/Oracle Portal Problems

Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
That does indeed seem a little odd... The portlet framework expects
these parameters, so I'm not sure there is a way around it. Did you
try upgrading to 2.1.6?

Nils-H

On Thu, Apr 16, 2009 at 4:26 PM, Stephen Turner <st...@mit.edu> wrote:
> Hello all -
>
> We've had some trouble using Struts 2 portlets (2.0.14) with Oracle Portal,
> and I wondered if anyone else had used this combination successfully.
>
> The problems occur with portlets that have a form and submit buttons, and
> the issue seems to be that Struts uses render parameters to pass information
> (like action name) from the event phase to the render phase. Oracle Portal
> keeps these values in the generated URL for the form action, and so they
> persist for longer than Struts is expecting them to.
>
> An aside - this is also an issue with straight JSR 168 portlets in the
> Oracle portal, but we can work around this by using session attributes to
> pass data from event to render, rather than render params. However, as
> Struts uses render params internally to figure out which action to invoke,
> there's no similar workaround for Struts. I suspect the problem is in the
> Oracle portal - the JSR 168 spec seems to indicate that render params are
> for passing data from event phase to render phase, but I wanted to see if
> anyone was aware of the issue and if there is a workaround. This all works
> perfectly when running in Pluto.
>
> Here's an illustration of the problem - we are using a "redirectAction" to
> get from event to render.
>
> I have a simple Struts action class "StrutsTest" which has these methods:
>
>        public String execute();   // implements event phase processing
>        public String doView();    // implements render phase processing
>
> These methods do nothing except logging.
>
> My form has a single text input field called "pie" and a single submit.
> Here's the relevant part of the struts config:
>
>  <action name="init">
>     <result name="success">/WEB-INF/view/index.jsp</result>
>  </action>
>
>  <action name="StrutsTestAction" class="struts2hello.StrutsTest">
>   <result name="input">/WEB-INF/view/index.jsp</result>
>   <result name="success" type="redirectAction" >
>     <param name="actionName">StrutsTestRender</param>
>     <param name="portletMode">view</param>
>     <param name="pie">${pie}</param>
>   </result>
>  </action>
>
>  <action name="StrutsTestRender" class="struts2hello.StrutsTest"
> method="doView">
>   <result name="success">/WEB-INF/view/index.jsp</result>
>  </action>
>
> Here's what happens, step by step:
>
> *** 1. First display. "init" action is invoked, which simply forwards to the
> jsp. The form action url has this in it:
>
>  struts.portlet.action%3D%252Fview%252FStrutsTestAction%26struts.portlet.mode%3Dview
>
> *** 2. I enter "apple" in the pie field and submit. The event phase mthod
> (execute) receives the value correctly and form is redisplayed .
>
> Logging shows this:
>
> 2009-04-16 09:32:31,581 INFO struts2hello.StrutsTest.execute - Begin execute
> 2009-04-16 09:32:31,583 INFO struts2hello.StrutsTest.execute - End execute
> 2009-04-16 09:32:31,765 INFO struts2hello.StrutsTest.doView - Begin doView
> A. Pie = apple
> 2009-04-16 09:32:31,767 INFO struts2hello.StrutsTest.doView - doView B.
> Phase: RENDER
> 2009-04-16 09:32:31,768 INFO struts2hello.StrutsTest.doView - End doView
>
> This is all correct - the event phase action is invoked, and then the render
> phase action (doView method) is invoked and the phase (from
> PortletActionContext) is RENDER.
>
> But, on redisplay, the form action URL now has this embedded:
>
> pie%3Dapple%26struts.portlet.action%3D%252Fview%252FStrutsTestRender%26struts.portlet.mode%3Dview%26struts.portlet.eventAction%3Dtrue
>
> AND
>
> struts.portlet.action%3D%252Fview%252FStrutsTestAction%26struts.portlet.mode%3Dview
>
> I believe this is where things start to go wrong - Oracle has put the render
> parameters (action name of "StrutsTestRender" and pie of "apple") into the
> generated action url, and subsequent submits will see these parameters.
>
> *** 3. Entering "cherry" into the pie field and submitting again shows this
> in the log:
>
> 2009-04-16 09:33:40,502 INFO struts2hello.StrutsTest.doView - Begin doView
> A. Pie = apple, cherry
> 2009-04-16 09:33:40,505 INFO struts2hello.StrutsTest.doView - doView B.
> Phase: EVENT
> 2009-04-16 09:33:40,508 INFO struts2hello.StrutsTest.doView - End doView
>
> So we've now gone directly into the render method, but we're in the event
> phase. Presumably because of struts.portlet.action value of
> "StrutsTestRender" in the form's action URL.
>
> Also we now have both "apple" and "cherry" in the "pie" parameter values:
> "apple" from being embedded in the URL, "cherry" from being entered in the
> form.
>
>
>
> --
> Stephen Turner
> Senior Programmer/Analyst - SAIS
> MIT IS&T
>
> ---------------------------------------------------------------------
> 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


Re: Struts 2 Portlet/Oracle Portal Problems

Posted by Stephen Turner <st...@MIT.EDU>.
On Thu, 16 Apr 2009 15:48:49 -0400, Martin Gainty <mg...@hotmail.com>  
wrote:

>
> you dont have a PortletSession?
>

Implementing SessionAware just gives me a java.util.Map object called  
session, not a PortletSession object.

I can get to the PortletSession through PortletActionContext:

PortletActionContext.getRenderRequest().getPortletSession()

Invalidating the PortletSession object gives me an IllegalState exception -

Steve

-- 
Stephen Turner
Senior Programmer/Analyst - SAIS
MIT IS&T

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


RE: Struts 2 Portlet/Oracle Portal Problems

Posted by Martin Gainty <mg...@hotmail.com>.
you dont have a PortletSession?

are you implementing the org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher

dispatcher identified as portlet-class thru portlet.xml?
portlet.xml contents:

<?xml version="1.0" encoding="UTF-8"?>

<portlet-app
   version="1.0"
   xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
   id="bookmark-portlet">

   <portlet id="HelloPortlet">
      <description xml:lang="EN">Simple hello world portlet</description>
      <portlet-name>HelloPortlet</portlet-name>
      <display-name xml:lang="EN">bookmark-portlet</display-name>
		
      <portlet-class>org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher</portlet-class>
http://struts.apache.org/2.0.14/docs/struts-2-portlet-tutorial.html
?
Martin Gainty 
______________________________________________ 
Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité 
This message is confidential. If you should not be the intended receiver, then we ask politely to report. Each unauthorized forwarding or manufacturing of a copy is inadmissible. This message serves only for the exchange of information and has no legal binding effect. Due to the easy manipulation of emails we cannot take responsibility over the the contents.
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
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.






> Date: Thu, 16 Apr 2009 21:25:30 +0200
> Subject: Re: Struts 2 Portlet/Oracle Portal Problems
> From: nilsga@gmail.com
> To: user@struts.apache.org
> 
> Not sure why this should have anything to do with the problem, but
> anyway, calling clear() on the map would invalidate the session.
> 
> Nils-H
> 
> On Thu, Apr 16, 2009 at 9:15 PM, Stephen Turner <st...@mit.edu> wrote:
> > On Thu, 16 Apr 2009 12:24:13 -0400, Martin Gainty <mg...@hotmail.com>
> > wrote:
> >
> >>
> >> 30 second solution seems to indicate session variables are auto-populating
> >> url
> >> so last statement(s) in doView method should invalidate your
> >> PortletSession
> >>
> >> // Code fragment from class implementing SessionAware containing the
> >> // session map in a instance variable "session". Attempting to invalidate
> >>
> >>    org.apache.struts2.portlet.servlet.PortletSession session;
> >>
> >> try {
> >>        ((org.apache.struts2.dispatcher.SessionMap) session).invalidate();
> >>    } catch (Exception e) {
> >>        logger.error(msg, e);
> >>    }
> >>
> >> out of curiosity are you implementing with METHOD="GET" or METHOD="POST"
> >> ?
> >> Martin
> >>
> >
> > Thanks for the reply Martin - I didn't get too far though.
> >
> > Implementing SessionAware gives me a simple Map object, not a PortletSession
> > object. Also casting PortletSession to SessionMap doesn't seem to please my
> > JVM.
> >
> > The form action uses a POST method.
> >
> > Thanks,
> > Steve
> >
> > --
> > Stephen Turner
> > Senior Programmer/Analyst - SAIS
> > MIT IS&T
> >
> > ---------------------------------------------------------------------
> > 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
> 

_________________________________________________________________
Rediscover Hotmail®: Get quick friend updates right in your inbox. 
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Updates2_042009

Re: Struts 2 Portlet/Oracle Portal Problems

Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
Not sure why this should have anything to do with the problem, but
anyway, calling clear() on the map would invalidate the session.

Nils-H

On Thu, Apr 16, 2009 at 9:15 PM, Stephen Turner <st...@mit.edu> wrote:
> On Thu, 16 Apr 2009 12:24:13 -0400, Martin Gainty <mg...@hotmail.com>
> wrote:
>
>>
>> 30 second solution seems to indicate session variables are auto-populating
>> url
>> so last statement(s) in doView method should invalidate your
>> PortletSession
>>
>> // Code fragment from class implementing SessionAware containing the
>> // session map in a instance variable "session". Attempting to invalidate
>>
>>    org.apache.struts2.portlet.servlet.PortletSession session;
>>
>> try {
>>        ((org.apache.struts2.dispatcher.SessionMap) session).invalidate();
>>    } catch (Exception e) {
>>        logger.error(msg, e);
>>    }
>>
>> out of curiosity are you implementing with METHOD="GET" or METHOD="POST"
>> ?
>> Martin
>>
>
> Thanks for the reply Martin - I didn't get too far though.
>
> Implementing SessionAware gives me a simple Map object, not a PortletSession
> object. Also casting PortletSession to SessionMap doesn't seem to please my
> JVM.
>
> The form action uses a POST method.
>
> Thanks,
> Steve
>
> --
> Stephen Turner
> Senior Programmer/Analyst - SAIS
> MIT IS&T
>
> ---------------------------------------------------------------------
> 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


Re: Struts 2 Portlet/Oracle Portal Problems

Posted by Stephen Turner <st...@MIT.EDU>.
On Thu, 16 Apr 2009 12:24:13 -0400, Martin Gainty <mg...@hotmail.com>  
wrote:

>
> 30 second solution seems to indicate session variables are  
> auto-populating url
> so last statement(s) in doView method should invalidate your  
> PortletSession
>
> // Code fragment from class implementing SessionAware containing the
> // session map in a instance variable "session". Attempting to invalidate
>
>     org.apache.struts2.portlet.servlet.PortletSession session;
>
> try {
>         ((org.apache.struts2.dispatcher.SessionMap)  
> session).invalidate();
>     } catch (Exception e) {
>         logger.error(msg, e);
>     }
>
> out of curiosity are you implementing with METHOD="GET" or METHOD="POST"
> ?
> Martin
>

Thanks for the reply Martin - I didn't get too far though.

Implementing SessionAware gives me a simple Map object, not a  
PortletSession object. Also casting PortletSession to SessionMap doesn't  
seem to please my JVM.

The form action uses a POST method.

Thanks,
Steve

-- 
Stephen Turner
Senior Programmer/Analyst - SAIS
MIT IS&T

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