Problem with xml valued request parameters in portlet. - Websphere

This is a discussion on Problem with xml valued request parameters in portlet. - Websphere ; Hi, I am facing a problem developing a JSR 168 portlet. My JSR portlet actually submits a request parameters whose value is an XML. But this XML is received with "<" and ">" escaped. For example, <form name="actionfrm" id="actionfrm" method="POST" ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Problem with xml valued request parameters in portlet.

  1. Problem with xml valued request parameters in portlet.

    Hi,

    I am facing a problem developing a JSR 168 portlet. My JSR portlet actually submits a request parameters whose value is an XML. But this XML is received with "<" and ">" escaped.

    For example,
    <form name="actionfrm" id="actionfrm" method="POST" action="<portlet:actionURL/>">
    <input type="hidden" name="xmlreq" value="<somexml />">
    <input type="button" name="click" value="click" onClick="document.actionfrm.submit()">
    </form>

    Now when this form is submitted, i expected request.getParameter("xmlreq") to return "<somexml />" but instead it return "<somexml />". I verified with an HttpAnalyzer that the request parameter that is passed from client browser is indeed <somexml />. And so somewhere in WPS server, this value's change.Is this possibly a bug in WebSphere portal ?

    Thanks for help in Advance
    Regards
    Sathya


  2. Re: Problem with xml valued request parameters in portlet.

    Sorry, some problem with this editor. The actual problem in the above example is that request.getParameter instead of returning returns $lt; somexml /$gt.

    PS: replace with $ with & in the message :-)

  3. Re: Problem with xml valued request parameters in portlet.

    On Feb 1, 8:10 pm, wrote:
    > Hi,
    >
    > I am facing a problem developing a JSR 168 portlet. My JSR portlet actually submits a request parameters whose value is an XML. But this XML is received with "<" and ">" escaped.
    >
    > For example,
    > <form name="actionfrm" id="actionfrm" method="POST" action="<portlet:actionURL/>">
    > <input type="hidden" name="xmlreq" value="<somexml />">
    > <input type="button" name="click" value="click" onClick="document.actionfrm.submit()">
    > </form>
    >
    > Now when this form is submitted, i expected request.getParameter("xmlreq") to return "<somexml />" but instead it return "<somexml />". I verified with an HttpAnalyzer that the request parameter that is passed from client browser is indeed <somexml />. And so somewhere in WPS server, this value's change.Is this possibly a bug in WebSphere portal ?
    >
    > Thanks for help in Advance
    > Regards
    > Sathya


    you need to decode the query parameter by either user defined method
    or some request get parameter overload!


+ Reply to Thread