Results 1 to 4 of 4

Thread: Spring MVC Portal: strange behavior in websphere when using urlGeneration

  1. #1

    Exclamation Spring MVC Portal: strange behavior in websphere when linking to mvc portlet page.

    Hi,

    I am currently using Spring MVC in Websphere portal 6, I am running into a strange problem when linking one portal to another portal page that houses a Spring MVC portlet.

    I'll try to describe the problem.

    From portlet Y in Page A I am linking to a Spring MVC Portlet in Page X, I am using urlGeneration from websphere as follows:

    Code:
    	<wps:urlGeneration contentNode="6_EEMJQ7P30OO0F02V5P246A2007" portletWindowState="Normal" layoutNode="3_EEMJQ7P30G83502V9DJUV60004" accessControlCheck="NoCheck">
    		<wps:urlParam name="action" value="menu"/>
            <a href="<% wpsURL.write(out); %>"> Search </a>
    	</wps:urlGeneration>
    I have the 'menu' action mapped in Spring MVC to display my main menu, and I am sending this as a param in the urlGeneration, this works well as long as I dont don't submit my form in my Spring MVC portlet, actually only if I dont submit to any non org.springframework.web.portlet.mvc.Parameterizabl eViewController Controller, after I submit a SimpleFormController for example, and I go back to Page A and link back to my Spring MVC portlet instead of going to my menu page as required by my action parameter, it instead resubmits the last form and I end up in another view.

    can anybody shed some light as to why this might be happening?

    Thanks,
    Angel
    Last edited by Angel; Feb 25th, 2009 at 02:00 PM.

  2. #2

    Default

    After debugging Springs DispatchPortlet I found that in the doRenderService method, Websphere is passing the action = "menu" from the urlGeneration link in the originalParameterMap of the RenderRequest passed to this method, but it's also for some reason including the other action parameter in the request hashmap of RenderRequest so when Spring does request.getParameter("action") it's getting the one from request and not from originalParameterMap. This only happens if I go back to Portal page A after submitting a form such as a SimpleFormController, otherwise both the originalParameterMap and the request proproties of RenderRequest have the same values for the action param.

    I still can't make any sense of this, is Spring leaving something behind in the session that Websphere is merging into the RenderRequest? I have not set sessionForm to true for any of my controllers.

    Please I would appreciate any help, a workaround would be godsend.

    Thanks,
    Angel
    Last edited by Angel; Feb 25th, 2009 at 03:49 PM.

  3. #3
    Join Date
    Nov 2006
    Posts
    16

    Default Also experiencing strange behaviour in Websphere Portal

    I'm not sure whether this is related, but we are also using Spring MVC in a Websphere Portal 6.1 environment, and we are seeing the following unusual behaviour:

    Navigating through the application is fine - however if you leave the portal page on which the Spring Portlet is on and then return back to the portal page, the portlet seems to re-initialise i.e. it does not retain the original navigation state of the portlet when you left it.

    I wonder whether this problem was introduced in version 6.1 of Webphere Portal.

    As we are also using spring webflow I've posted the problem here:http://forum.springsource.org/showth...sphere+portlet

    Can anyone suggest any workarounds?

  4. #4
    Join Date
    Apr 2012
    Posts
    1

    Default Similar issue

    Quote Originally Posted by Angel View Post
    After debugging Springs DispatchPortlet I found that in the doRenderService method, Websphere is passing the action = "menu" from the urlGeneration link in the originalParameterMap of the RenderRequest passed to this method, but it's also for some reason including the other action parameter in the request hashmap of RenderRequest so when Spring does request.getParameter("action") it's getting the one from request and not from originalParameterMap. This only happens if I go back to Portal page A after submitting a form such as a SimpleFormController, otherwise both the originalParameterMap and the request proproties of RenderRequest have the same values for the action param.

    I still can't make any sense of this, is Spring leaving something behind in the session that Websphere is merging into the RenderRequest? I have not set sessionForm to true for any of my controllers.

    Please I would appreciate any help, a workaround would be godsend.

    Thanks,
    Angel
    Has anyone found the workaround for this?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •