portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glenn Golden <ggol...@umich.edu>
Subject custommizer leaving (re: bug 6820), suspect redirect is not worki ng
Date Mon, 04 Mar 2002 15:38:58 GMT
As reported in bug 6820, the customizer is not leaving for me when I do a
"save and apply".  This is windows xp, jdk 1.4.0, tomcat 4.0.2, latest
jetspeed cvs.
 
I investigated this and found that the code responding to this is the
RowColumnControllerAction or MultiColumnControllerAction's doCancel().
 
In 1.3a2, these would cause an exit using this code:
 
    data.setScreenTemplate("Home");
 
Now, they cause an exit by doing a redirect:
 
                DynamicURI duri = new DynamicURI(data);
                data.getResponse().sendRedirect(duri.toString());

This sounds great!  But I suspect it's not working.
 
I've made an action class that test this. You can encode a link to this
class":
 
<a href=\"TestActionII
<http://localhost/jetspeed/portal/action/TestActionII\>
http://localhost/jetspeed/portal/action/TestActionII\">TestActionII</a>
 
in the navigation, or use a simple portlet to get the link on the page.
When I press the link, I get the same behavior as from the customizers, i.e.
the redirect is attempted and the browser never gets a page back.
 
Here's the action class:
 
* * *
 
package umich.chef.actions;
 
import org.apache.turbine.util.Log;
import org.apache.turbine.util.RunData;
import org.apache.turbine.modules.Action;
import org.apache.turbine.util.DynamicURI;
import org.apache.turbine.util.StringUtils;
 
public class TestActionII
    extends Action
{
    public void doPerform(RunData data)
    {
        try
        {
            DynamicURI duri = new DynamicURI(data);
            Log.debug(this + ".doPerform(): redirect to: " +
duri.toString());
            data.getResponse().sendRedirect(duri.toString());
        }
        catch ( Exception e )
        {
            Log.error(this + ".doPerform(): exception", e);
        }
    }
}

 
* * *
 
I get this in my log, showing that the code is run and the redirect is being
attempted with a reasonable url:
 
[Mon Mar 04 09:45:33 EST 2002] -- DEBUG --
umich.chef.actions.TestActionII@4c94e5.doPerform
<mailto:umich.chef.actions.TestActionII@4c94e5.doPerform> (): redirect to:
http://localhost/jetspeed/portal;jsessionid=EC51FA4C3333ADFE7AEC6457CEE38A6A
<http://localhost/jetspeed/portal;jsessionid=EC51FA4C3333ADFE7AEC6457CEE38A6
A> 

And no exception in the log.
 
So, I think the sendRedirect() is broken!
 
* * *
 
I then started a session in IE with cookies turned of, and got to the
display that has my link on it.  Then I used "protocol explorer", a java app
that you can use to send HTTP requests, and sent the request that would go
from clickin the link, with the proper session id, so it would look to the
server just like a click from IE.
 
The request:
 
Can anyone help?  Or at least try it out and see if it works for you?
Thanks.
- Glenn

--------------------------------------------

Glenn R. Golden, Systems Research Programmer

University of Michigan School of Information

ggolden@umich.edu 734-615-1419

 <http://www-personal.si.umich.edu/~ggolden/>
http://www-personal.si.umich.edu/~ggolden/

--------------------------------------------

 

 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message