You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Michael Burschik <Bu...@lotto-berlin.de> on 2003/10/08 12:36:42 UTC

redirect requested, response already committed

I created a database browser based on the bluesunrise tutorial example.
"Edit" links for the individual items link to another portlet on another
page. The edit form works as expected, except for the fact that I can not
return to the database browser with a redirect. The only clue I found in the
jetspeed log is the notice "redirect requested, response already committed",
which I do not understand.

This question, or a similar one, seems to have been raised once before in
March, but I failed to find an answer to the inital post.

Any elucidation would be warmly appreciated.

Regards,

Michael Burschik


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


AW: redirect requested, response already committed

Posted by Michael Burschik <Bu...@lotto-berlin.de>.
As far as I can see, the method doCancel is called as expected. This in turn
calls returnToBrowser, which uses rundata.setRedirectURI to request a
redirect. But then, the view processor starts processing news-form, which is
the template associated with NewsFormAction, rather than processing
news-portlet, which is the template associated with NewsBrowser. Has the
redirect failed?

[09 Oct 2003 10:13:40 DEBUG] - GenericMVCPortlet: Executing action
[portlets.NewsFormAction] for portlet [NewsForm]
[09 Oct 2003 10:13:40 DEBUG] - Action: try executing events
[09 Oct 2003 10:13:40  INFO] - NewsFormAction.doCancel
[09 Oct 2003 10:13:40  INFO] - NewsFormAction.returnToBrowser
[09 Oct 2003 10:13:40  INFO] - setting redirect URI
http://edv51.iplan.dklb.de:8080/infoauftritt/portal/media-type/html/user/tur
bine/page/de
fault.psml/js_panename/NewsBrowser
[09 Oct 2003 10:13:40  INFO] - GenericMVCPortlet - calling processView on
processor
[09 Oct 2003 10:13:40  INFO] - VelocityViewProcessor - processing news-form
[09 Oct 2003 10:13:40  INFO] - VelocityViewProcessor - locating template -
org.apache.jetspeed.services.rundata.DefaultJetspeedRunData@59c8b
5news-form.vm
[09 Oct 2003 10:13:40 DEBUG] - TemplateLocator: template exists:
/var/tomcat4/webapps/infoauftritt/WEB-INF/templates/vm/portlets/html/news-f
orm.vm returning /html/news-form.vm
[09 Oct 2003 10:13:40  INFO] - GenericMVCPortlet - setting this portlet's
content
[09 Oct 2003 10:13:40 DEBUG] - CapabilityMap: User-agent: Mozilla/4.0 mapped
to ns4text/html-HTML_3_2/HTML_JAVA/HTML_JAVASCRIPT/HTML_TABLE/H
TML_FORM/HTML_FRAME/HTML_IMAGE/HTML_CSS1/HTML_LAYER/HTML_PLUGIN/HTML_DOM_NS4
/HTTP_COOKIE/
[09 Oct 2003 10:13:40 DEBUG] - TemplateLocator: template exists:
/var/tomcat4/webapps/infoauftritt/WEB-INF/templates/vm/navigations/html/dkl
b_bottom.vm returning /html/dklb_bottom.vm
[09 Oct 2003 10:13:40  INFO] - redirect requested, response already
committed: http://edv51.iplan.dklb.de:8080/infoauftritt/portal/media-typ
e/html/user/turbine/page/default.psml/js_panename/NewsBrowser

Regards

Michael Burschik


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


AW: redirect requested, response already committed

Posted by Michael Burschik <Bu...@lotto-berlin.de>.
> Sounds like you are trying to redirect from within the build normal
> context method, and not the action.
> You have to redirect in the action phase, its too late in the
> getContent phase.

That much was obvious. But if I use an action method like doCancel, then
buildNormalContext isn't called. Or is it?

> Anyway it does work in the tutorial, right?
> I would suggest looking at the code there....

Yes, the tutorial works. And yes, I have looked at the code there. In fact,
I pretty much copied the example provided by the tutorial and modified it
slightly. Apparently, one of these slight modifications horribly broke the
tutorial example. And yes, I would have read the f*ing manual if there was
one.

Regards

Michael Burschik


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


Re: redirect requested, response already committed

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Wednesday, October 8, 2003, at 03:36  AM, Michael Burschik wrote:

> I created a database browser based on the bluesunrise tutorial example.
> "Edit" links for the individual items link to another portlet on 
> another
> page. The edit form works as expected, except for the fact that I can 
> not
> return to the database browser with a redirect. The only clue I found 
> in the
> jetspeed log is the notice "redirect requested, response already 
> committed",
> which I do not understand.
>
> This question, or a similar one, seems to have been raised once before 
> in
> March, but I failed to find an answer to the inital post.
>
> Any elucidation would be warmly appreciated.
>

Sounds like you are trying to redirect from within the build normal 
context method, and not the action.
You have to redirect in the action phase, its too late in the 
getContent phase.

Anyway it does work in the tutorial, right?
I would suggest looking at the code there....

See TutorialCoffeesAction, the returnToBrowser method, called from the 
doUpdate action


--
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
+01 707 773-4646
+01 707 529 9194


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