Topic
  • 17 replies
  • Latest Post - ‏2013-02-17T18:23:03Z by SystemAdmin
SystemAdmin
SystemAdmin
30895 Posts

Pinned topic Problem migrating struts portlet from WPS 6.0 to WPS 6.1

‏2008-10-30T18:59:15Z |
Hi,

i want to deploy a struts portlet, which is working fine on WPS6.0 on WPS6.1.

but I get the following exception

javax.portlet.PortletException: javax.portlet.PortletException: javax.servlet.jsp.JspException: Exception forwarding for name Init: javax.servlet.ServletException: com.ibm.ws.portletcontainer.core.rd.impl.IncludedServletRequestImpl incompatible with javax.portlet.RenderRequest
at com.ibm.portal.struts.command.StrutsViewJspCommand.includeURL(StrutsViewJspCommand.java:192)
at com.ibm.portal.struts.command.StrutsViewJspCommand.execute(StrutsViewJspCommand.java:154)
at com.ibm.wps.standard.struts.util.WpsStrutsUtil.executeCommand(WpsStrutsUtil.java:1344)
at com.ibm.wps.standard.struts.util.WpsStrutsUtil.executeCommand(WpsStrutsUtil.java:1303)
at com.ibm.wps.standard.struts.util.WpsStrutsUtil.executeSavedCommand(WpsStrutsUtil.java:1218)
at com.ibm.portal.struts.portlet.StrutsPortlet.doService(StrutsPortlet.java:1131)

The error is thrown here: "<logic:forward name="Init"/>"
The forward "Init" is not the problem, it is configured properly.
Could it be a problem with the taglib?
Please help me to fix this.
Thanks!
Updated on 2013-02-17T18:23:03Z at 2013-02-17T18:23:03Z by SystemAdmin
  • jwbarnes
    jwbarnes
    3336 Posts

    Re: Problem migrating struts portlet from WPS 6.0 to WPS 6.1

    ‏2008-10-30T19:01:01Z  
    you HAVE to upgrade the struts jars

    please see the struts apps in 6.1 installableApps

    Jim


    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0
    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0

    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM
  • SystemAdmin
    SystemAdmin
    30895 Posts

    Re: Problem migrating struts portlet from WPS 6.0 to WPS 6.1

    ‏2008-10-30T23:23:16Z  
    • jwbarnes
    • ‏2008-10-30T19:01:01Z
    you HAVE to upgrade the struts jars

    please see the struts apps in 6.1 installableApps

    Jim


    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0
    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0

    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM
    Thx for the fast answer!
    Where can I get the new struts jars from and which version do I have to use?
    These: http://struts.apache.org/download.cgi#struts2012 ?
  • jwbarnes
    jwbarnes
    3336 Posts

    Re: Problem migrating struts portlet from WPS 6.0 to WPS 6.1

    ‏2008-10-31T01:13:08Z  
    Thx for the fast answer!
    Where can I get the new struts jars from and which version do I have to use?
    These: http://struts.apache.org/download.cgi#struts2012 ?
    sorry for not being clearer, under installableApps there are several struts apps you need to get the jars from those and update the jars in your war then update it into portal


    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0
    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0

    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM
  • SystemAdmin
    SystemAdmin
    30895 Posts

    Re: Problem migrating struts portlet from WPS 6.0 to WPS 6.1

    ‏2008-10-31T04:00:33Z  
    Thx for the fast answer!
    Where can I get the new struts jars from and which version do I have to use?
    These: http://struts.apache.org/download.cgi#struts2012 ?
    Hi,

    You can use the struts jars from the any of the war files found in <Portal_Root>/InstallableApps/
    like

    SPFStandardBlank.war/SPFStandardClock.war

    you can find the jars inside WEB-INF/lib folder

    Please make sure that u copy all struts related jars as internal jars(Inside ur war file)

    Thanks for Jim, he also helped us in this issue

    Thanks and Regards
    Selva
  • Gerard161
    Gerard161
    3 Posts

    Re: Problem migrating struts portlet from WPS 6.0 to WPS 6.1

    ‏2009-02-12T15:42:30Z  
    • jwbarnes
    • ‏2008-10-31T01:13:08Z
    sorry for not being clearer, under installableApps there are several struts apps you need to get the jars from those and update the jars in your war then update it into portal


    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0
    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0

    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM
    We are also having issues migrating from Portal 5.1 to 6.1

    We have a struts application that worked fine in Portal 5.1 but when we try to run it on Portal 6.1 we are having issues passing paramaters between the action class's and the jsp's.

    in the action class we use request.getPortletSession().setAttribute() but when forwarded to the jsp it can no longer find the object. Same issue when we set paramaters from the jsp to action class.

    We followed the info center and also updated the struts jar files from one of the sample apps but this didn't resolve the issue.
  • SystemAdmin
    SystemAdmin
    30895 Posts

    Re: Problem migrating struts portlet from WPS 6.0 to WPS 6.1

    ‏2009-02-27T18:50:48Z  
    • Gerard161
    • ‏2009-02-12T15:42:30Z
    We are also having issues migrating from Portal 5.1 to 6.1

    We have a struts application that worked fine in Portal 5.1 but when we try to run it on Portal 6.1 we are having issues passing paramaters between the action class's and the jsp's.

    in the action class we use request.getPortletSession().setAttribute() but when forwarded to the jsp it can no longer find the object. Same issue when we set paramaters from the jsp to action class.

    We followed the info center and also updated the struts jar files from one of the sample apps but this didn't resolve the issue.
    I am migration from portal 5.1 to 6.1. I have followed steps necessary for Struts migration under

    Link: http://publib.boulder.ibm.com/infocenter/wpdoc/v6r1m0/index.jsp?topic=/com.ibm.wp.ent.doc/migrate/mig_struts.html

    I have issues with the Struts Action Form set to session.

    1. Action A1 uses Actionform F1 and is forwarded to JSP J1.

    before forwarding to JSP J1, Actionform F1 is prepopulated with values and is set to portletsession(also is session scope in strutsconfig.xml)

    Problem: submit from JSP J1, does some processing forwards to the same JSP J1 for getting new values using the same form F1. But this time the old collections in F1 returns null throwing a null pointer exception.

    Note :I was able to get this working by explicitly setting all the collections to session. but this doesn't makes sense of the form being in session.
    Note: also if we set the form to httpsession instead of portletsession it works
    2. Action A1 uses Actionform F1 and is forwarded to JSP J1.

    Same Action A1 is forwarded to JSP J2 (Look Up dispatch action).

    JSP J2 is associated to ActionFrom F2 and needs some values prepopulated before being forwarded from Action A1.

    In Action A1 we do the following to populate ActionFrom F2:

    ActionForm F2 = new ActionFrom();
    F2.setvalues(collections)
    ....
    ...
    F2 is set to portletsession (Note: if we set the form to httpsession instead of portletsession it works)

    Submit action throws null pointer or failed obtain collection since the collection is null.
  • SystemAdmin
    SystemAdmin
    30895 Posts

    Re: Problem migrating struts portlet from WPS 6.0 to WPS 6.1

    ‏2009-08-29T16:26:07Z  
    I am migration from portal 5.1 to 6.1. I have followed steps necessary for Struts migration under

    Link: http://publib.boulder.ibm.com/infocenter/wpdoc/v6r1m0/index.jsp?topic=/com.ibm.wp.ent.doc/migrate/mig_struts.html

    I have issues with the Struts Action Form set to session.

    1. Action A1 uses Actionform F1 and is forwarded to JSP J1.

    before forwarding to JSP J1, Actionform F1 is prepopulated with values and is set to portletsession(also is session scope in strutsconfig.xml)

    Problem: submit from JSP J1, does some processing forwards to the same JSP J1 for getting new values using the same form F1. But this time the old collections in F1 returns null throwing a null pointer exception.

    Note :I was able to get this working by explicitly setting all the collections to session. but this doesn't makes sense of the form being in session.
    Note: also if we set the form to httpsession instead of portletsession it works
    2. Action A1 uses Actionform F1 and is forwarded to JSP J1.

    Same Action A1 is forwarded to JSP J2 (Look Up dispatch action).

    JSP J2 is associated to ActionFrom F2 and needs some values prepopulated before being forwarded from Action A1.

    In Action A1 we do the following to populate ActionFrom F2:

    ActionForm F2 = new ActionFrom();
    F2.setvalues(collections)
    ....
    ...
    F2 is set to portletsession (Note: if we set the form to httpsession instead of portletsession it works)

    Submit action throws null pointer or failed obtain collection since the collection is null.
    Hi satish

    i am migrating the strust portlet from 6.0 to 6.1 ...
    i am aslo facing the same issue, is the issue has been solved for u..can u please help me in resolving the issue....a bit urgency..........

    Regards
    Chaitanya
  • kmaru
    kmaru
    6 Posts

    Re: Problem migrating struts portlet from WPS 6.0 to WPS 6.1

    ‏2009-09-16T20:27:08Z  
    Hi satish

    i am migrating the strust portlet from 6.0 to 6.1 ...
    i am aslo facing the same issue, is the issue has been solved for u..can u please help me in resolving the issue....a bit urgency..........

    Regards
    Chaitanya
    I'm having the same issue. Anybody solved it?

    I have a work around which is the following.
    But I'm hoping I do not have to change all the jsp's we have for the migration.

    In Action:
    request.getPortletSession().setAttribute("varName", varValue);

    In jsp:
    <% javax.portlet.PortletSession psession = ((javax.portlet.PortletRequest)request).getPortletSession(); %>
    <%=(String)psession.getAttribute("varName") %>

    But will not work if used:
    <jsp:useBean id="varName" class="java.lang.String" scope="session"></jsp:useBean>
    <%=varName%>

    Thank you,
  • SystemAdmin
    SystemAdmin
    30895 Posts

    Re: Problem migrating struts portlet from WPS 6.0 to WPS 6.1

    ‏2009-10-22T15:18:26Z  
    • kmaru
    • ‏2009-09-16T20:27:08Z
    I'm having the same issue. Anybody solved it?

    I have a work around which is the following.
    But I'm hoping I do not have to change all the jsp's we have for the migration.

    In Action:
    request.getPortletSession().setAttribute("varName", varValue);

    In jsp:
    <% javax.portlet.PortletSession psession = ((javax.portlet.PortletRequest)request).getPortletSession(); %>
    <%=(String)psession.getAttribute("varName") %>

    But will not work if used:
    <jsp:useBean id="varName" class="java.lang.String" scope="session"></jsp:useBean>
    <%=varName%>

    Thank you,
    Having exactly the same problem this end. "Exception forwarding for name welcome" etc.

    We have tried every combination of JAR files from the 6.1 apps but no luck. IBM, what is going on here? We upgraded RAD to 7.5.4 and are using Portal 6.1, but this is bordering on ridiculous. We also tried creating the 7.5.4 BASIC struts app, as simple as it gets and OUT OF THE BOX it will not deploy to 6.1.

    Anybody?
  • SystemAdmin
    SystemAdmin
    30895 Posts

    Re: Problem migrating struts portlet from WPS 6.0 to WPS 6.1

    ‏2009-10-22T15:20:06Z  
    Hi,

    You can use the struts jars from the any of the war files found in <Portal_Root>/InstallableApps/
    like

    SPFStandardBlank.war/SPFStandardClock.war

    you can find the jars inside WEB-INF/lib folder

    Please make sure that u copy all struts related jars as internal jars(Inside ur war file)

    Thanks for Jim, he also helped us in this issue

    Thanks and Regards
    Selva
    Tried that, but still no luck.

    We have tried every combination of JAR files from the 6.1 apps but no luck. IBM, what is going on here? We upgraded RAD to 7.5.4 and are using Portal 6.1, but this is bordering on ridiculous. We also tried creating the 7.5.4 BASIC struts app, as simple as it gets and OUT OF THE BOX it will not deploy to 6.1.

    Anybody?
  • manisha garg
    manisha garg
    32 Posts

    Re: Problem migrating struts portlet from WPS 6.0 to WPS 6.1

    ‏2010-09-02T12:39:37Z  
    Tried that, but still no luck.

    We have tried every combination of JAR files from the 6.1 apps but no luck. IBM, what is going on here? We upgraded RAD to 7.5.4 and are using Portal 6.1, but this is bordering on ridiculous. We also tried creating the 7.5.4 BASIC struts app, as simple as it gets and OUT OF THE BOX it will not deploy to 6.1.

    Anybody?
    any solution to this thread... i m facing the same issue :(
    replacing jars as suggested above, did not solve the problem

    Please help !

    Thanks,
    Manisha
  • manisha garg
    manisha garg
    32 Posts

    Re: Problem migrating struts portlet from WPS 6.0 to WPS 6.1

    ‏2010-09-13T12:18:48Z  
    any solution to this thread... i m facing the same issue :(
    replacing jars as suggested above, did not solve the problem

    Please help !

    Thanks,
    Manisha
    please help... we are still facing this issue and didnt get success.

    we have also tried-
    http://publib.boulder.ibm.com/infocenter/wpzosdoc/v6r1/index.jsp?topic=/com.ibm.wp.zos.doc/migrate/mig_struts.html

    but in vain :(

    Thanks,
    Manisha
  • Praveen_DVS
    Praveen_DVS
    1 Post

    Re: Problem migrating struts portlet from WPS 6.0 to WPS 6.1

    ‏2010-09-18T14:35:50Z  
    please help... we are still facing this issue and didnt get success.

    we have also tried-
    http://publib.boulder.ibm.com/infocenter/wpzosdoc/v6r1/index.jsp?topic=/com.ibm.wp.zos.doc/migrate/mig_struts.html

    but in vain :(

    Thanks,
    Manisha
    I had similar problems while migrating struts portlets from 5.1 to 6.1. Session variables added to portlet session in the servlets were not accessible in the JSP and resulted in null pointed exception. Because of this problem I decided change all my code but ended up wasting lot of time. Later I opened up a PMR with IBM and they gave me a solution. The solution was to install a fix pack.

    The fix pack is APAR PK92740

    While installing this fix pack using Portal update installer, you might be asked to install a few more dependent fix packs based on the version of your Portal and App server.

    Thanks,
    Praveen
  • manisha garg
    manisha garg
    32 Posts

    Re: Problem migrating struts portlet from WPS 6.0 to WPS 6.1

    ‏2010-09-20T10:03:08Z  
    I had similar problems while migrating struts portlets from 5.1 to 6.1. Session variables added to portlet session in the servlets were not accessible in the JSP and resulted in null pointed exception. Because of this problem I decided change all my code but ended up wasting lot of time. Later I opened up a PMR with IBM and they gave me a solution. The solution was to install a fix pack.

    The fix pack is APAR PK92740

    While installing this fix pack using Portal update installer, you might be asked to install a few more dependent fix packs based on the version of your Portal and App server.

    Thanks,
    Praveen
    Thanks Praveen ! thank u very much

    We will install this pack. But did it resolve your issue?

    Thanks,
    Manisha
  • ry_wilson
    ry_wilson
    337 Posts

    Re: Problem migrating struts portlet from WPS 6.0 to WPS 6.1

    ‏2010-09-28T20:26:49Z  
    Thanks Praveen ! thank u very much

    We will install this pack. But did it resolve your issue?

    Thanks,
    Manisha
    It looks like there are a few different issues being discussed in this thread.
    APAR PK92740 fixes several issues with the SPF and Portal 6.1. There were major changes to the portlet container from 6.0 to 6.1. In 6.1 you can no longer cast a HttpServletRequest to a PortletRequest (it looks like this may be the issue in the first posting on this thread). Because of this you need this APAR so that the SPF can work correctly with the Apache Struts framework.
    Some of the issues fixes with this APAR are:
    1.) Two portlet instances overriding session data.
    2.) Setting session attributes in an action and unable to retrieve them in the JSP
    3.) Formbeans scoped to the session may throw exceptions.

    Please make sure you review the readMe.txt as this APAR requires some changes to your custom portlet. Specifically you need to make sure your app is J2EE 2.4 and you need to add a servlet filter.

    Ryan

    SCJP & SCWCD
    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0

    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM
  • jabbar2k
    jabbar2k
    2 Posts

    Problem migrating struts portlet from WPS 6.0 to WPS 7.0 in config mode

    ‏2012-02-06T16:04:58Z  
    Hi,
    I'm migrating some JSR168 STRUTS portlets from portal V5.1/6.0.1.4 to portal V7.0.0.2; I've followed all the steps (at least, I think so) specified in 'Migrating portlets built with Struts Portlet Framework' document; everything seems to work fine but, when I switch to config mode, I get the following error:
    "Error 500: javax.servlet.jsp.JspException: Cannot retrieve mapping for action /saveConfig"

    Of course, SaveConfig action worked fine in previous versions.
    Is there something wrong in my (attached) old portlet?

    Many thanks in advance and best regards

    Attachments

  • SystemAdmin
    SystemAdmin
    30895 Posts

    Re: Problem migrating struts portlet from WPS 6.0 to WPS 6.1

    ‏2013-02-17T18:23:03Z  
    Thanks Praveen ! thank u very much

    We will install this pack. But did it resolve your issue?

    Thanks,
    Manisha
    I am getting the same issue when i migrated the code from v6.0 to v8.0 . If i set the variabled to request i am able to get them but if set to portlet session its not getting retrieved on JSP's. Is there any solution to it yet ? Not sure if this APAR is applicable for v8.0 . Please respond