IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Recommended way to get request parameters

    Posted 03/15/11 07:11 PM

    Is there a recommended way to get URL request parameters like:

    javax.servlet.http.HttpServletRequest request = (javax.servlet.http.HttpServletRequest)com.webMethods.portal.framework.impl.PortalServlet.getCurrentRequest();

        String myUrlParameter= (String) request.getParameter("myUrlParameter");
    

    I have been doing this successfully in the “beforeRenderResponse” method to ensure it always gets checked, but thought it should occur earlier in the jsf lifecycle.

    Thanks!


    #MWS-CAF-Task-Engine
    #webMethods-BPMS
    #webMethods


  • 2.  RE: Recommended way to get request parameters

    Posted 03/16/11 07:32 PM

    That is a fine technique for getting a ‘naked’ URL param using an MWS specific API.

    However, if you are using (Extended) PortletURLs, you can read them off the current portlet request via the faces ExternalContext API (ie
    getFacesContext().getExternalContext().getRequestParameterMap().get(“myParam”).

    You can also read them in a binding expression via the “param” implicit
    variable (ie #{param[“myParam”]}).

    Regards,
    –mark


    #webMethods-BPMS
    #webMethods
    #MWS-CAF-Task-Engine


  • 3.  RE: Recommended way to get request parameters

    Posted 02/04/13 11:17 AM

    Hi Mimel,

    I don’t know if i can use the methods on the top to recover the value of my param using an htmlCommandLink, i don’t know if i can read them off the current portlet request via the faces ExternalContext or in a binding expression ??

    my action returns always a NULL value:

    
    public String domaineSelected() {
    String value = (String)resolveExpression("#{param['domaineParam']}");  
    //String value2 = (String)getFacesContext().getExternalContext().getRequestParameterMap().get("domaineParam"); 
    return value;
    }	

    knowing that my param contains always a value on the url request :

    Thanks and regards


    #webMethods
    #MWS-CAF-Task-Engine
    #webMethods-BPMS