Topic
  • 4 replies
  • Latest Post - ‏2013-11-20T20:40:16Z by Sem11211
Sem11211
Sem11211
26 Posts

Pinned topic Handling HTTP request in Portlet Factory application

‏2013-11-19T22:37:18Z |

Hi,

I have an existing web application. I want to pass query strings in url to a portlet factory application(WPF 7.0) and open that application in a new browser. Looking for how to invoke and how to process the request parameters in WPF application. Can anyone please provide similar sample model or some reference for this or some idea.

-Thanks

  • mburati
    mburati
    2562 Posts

    Re: Handling HTTP request in Portlet Factory application

    ‏2013-11-19T23:38:55Z  

    It depends on what type of application (Portlet in a portal page vs Standalone Web Application) you're trying to build, and what your app needs to do with those request inputs when it gets them.

     - Standalone webapp is easy, URL params come in as request parameters and you can get them with webAppAccess.getRequestInputs() or better yet leverage a higher level builder (such as via page automation) to get the inputs and populate an operation's inputs for you.

     - Portlet apps are more difficult because by default portal (due to JSR portlet spec) doesn't give portal page URL params to portlets directly via request parameters.

    Jonathan provided a reference to a sample for the latter (portlet app getting params from an external site) in this recent thread in this forum:

    https://www.ibm.com/developerworks/community/forums/html/topic?id=73984cc1-726c-46fa-a85b-e9ce9dd40286&ps=25

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • Sem11211
    Sem11211
    26 Posts

    Re: Handling HTTP request in Portlet Factory application

    ‏2013-11-20T19:43:55Z  
    • mburati
    • ‏2013-11-19T23:38:55Z

    It depends on what type of application (Portlet in a portal page vs Standalone Web Application) you're trying to build, and what your app needs to do with those request inputs when it gets them.

     - Standalone webapp is easy, URL params come in as request parameters and you can get them with webAppAccess.getRequestInputs() or better yet leverage a higher level builder (such as via page automation) to get the inputs and populate an operation's inputs for you.

     - Portlet apps are more difficult because by default portal (due to JSR portlet spec) doesn't give portal page URL params to portlets directly via request parameters.

    Jonathan provided a reference to a sample for the latter (portlet app getting params from an external site) in this recent thread in this forum:

    https://www.ibm.com/developerworks/community/forums/html/topic?id=73984cc1-726c-46fa-a85b-e9ce9dd40286&ps=25

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

    Hi Mike,

    Thanks for your reply. My requirement is to receive request parameters in WPF based portal application from normal web application through an URL and webAppAccess.getRequestInputs() gives me null in this case. Did you mean to go the Resolver way as mentioned by Jonathan in my usecase.

    -Thanks

  • mburati
    mburati
    2562 Posts

    Re: Handling HTTP request in Portlet Factory application

    ‏2013-11-20T19:52:57Z  
    • Sem11211
    • ‏2013-11-20T19:43:55Z

    Hi Mike,

    Thanks for your reply. My requirement is to receive request parameters in WPF based portal application from normal web application through an URL and webAppAccess.getRequestInputs() gives me null in this case. Did you mean to go the Resolver way as mentioned by Jonathan in my usecase.

    -Thanks

    Correct, as I mentioned above, you can use webAppAccess.getRequestInputs if you're building a standalone web application, but if you're building a portlet application for portal then you won't get the request inputs from the portlet request parameters by default, so you need to look into a solution like Jonathan describes in that other thread.

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • Sem11211
    Sem11211
    26 Posts

    Re: Handling HTTP request in Portlet Factory application

    ‏2013-11-20T20:40:16Z  
    • mburati
    • ‏2013-11-20T19:52:57Z

    Correct, as I mentioned above, you can use webAppAccess.getRequestInputs if you're building a standalone web application, but if you're building a portlet application for portal then you won't get the request inputs from the portlet request parameters by default, so you need to look into a solution like Jonathan describes in that other thread.

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

    Thank you. I appreciate your quick response.