[opencms-dev] request.setParameter ???

Stephan Hartmann hartmann at metamesh.de
Wed Nov 1 10:30:26 CET 2006


There is no setParameter method on neither the HttpServletRequest nor the
ServletRequest class. Request parameters come from the client and are
unmodifiable.
To transfer an object from one jsp to another you can set it as request
attribute with the method ServletRequest.setAttribute(String key, Object
o) and retrieve it with ServletRequest.getAttribute(String key).

Regards,
Stephan

> Hi,
>
> I have a jsp-template which includes parts of another template (with
> main header and footer stuff), so in the first template I have something
> like
>
> -------------------------------------------------------
> <%
>    ...
>    java.util.HashMap parameters = new java.util.HashMap();
>    String unique_id = "test";
>    parameters.put("uid", unique_id);
> %>
> <cms:template element="head">
> <% cmsa.include("master-template.jsp", "head", parameters); %>
> </cms:template>
> <%
>  out.print(parameters.get("uid");
> %>
> -------------------------------------------------------
>
> that works, now inside of master-template I am doing something with that
> unique_id-parameter - read with request.getParameter("uid). Inside the
> master-template the value of that unique_id gets changed and my
> calling-jsp-template needs to know the new value! I tried
>
> request.setParameter("uid","other value")
>
> inside of master-template, but that does not work
>
> any ideas?
> Thanks
> John Bieling
>
>
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>




More information about the opencms-dev mailing list