You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Anjali Jain <An...@NIIT.com> on 2002/06/17 13:22:00 UTC

forming a query string in struts...

Hi All,

how can we form a dynamic query string in struts...??


----anjali

Power your enterprise with custom solutions in eLearning and Knowledge
Management from NIIT - Knowledge Solutions. For details visit our website
http://www.ksb.niit.com 

___________________NOTICE____________________________ 
This electronic mail transmission contains confidential information intended
only for the person(s) named.  Any use, distribution, copying or disclosure
by any other person is strictly prohibited. If you received this
transmission in error, please notify the sender by reply e-mail and then
destroy the message.  Opinions, conclusions, and other information in this
message that do not relate to the official business of NIIT shall be
understood to be neither given nor endorsed by NIIT When addressed to NIIT
clients, any information contained in this e-mail is subject to the terms
and conditions in the governing client contract.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: forming a query string in struts...

Posted by Yaman <ya...@nous.soft.net>.
Hi Anjali,

Maintain a HashMap with paramNames and paramValues , As paramnames are
constants and paramValues are dynamic
keep this dynamic value into a variable and add that variable to HashMap.
once HashMap is filled up with query string data
use <html:link> tag.. then it renders the querystring, See the example
below.

Ex.
I have two variables in request scope
<jsp:useBean id="myId" scope="request" class="java.lang.String" />
<jsp:useBean id="seNo" scope="request" class="java.lang.String" />
<%
 //create a hash map which holds the parameter names and values
java.util.HashMap htmlLinkValues = new java.util.HashMap();
htmlLinkValues.put("actionFrom", actionFrom); ;
htmlLinkValues.put("myidentity ", myId); ;
htmlLinkValues.put("sequenceNo", seNo);
pageContext.setAttribute("myQueryString", htmlLinkValues);
%>

<html:link page="/mystring.do" name="myQueryString" >
	<img src="<bean:write name="ctxtPath"/>/images/details.gif" width="55"
height="22" border="0">
</html:link> &nbsp; &nbsp; &nbsp;

HTH
</rayaku>




-----Original Message-----
From: Anjali Jain [mailto:AnjaliJ@NIIT.com]
Sent: Monday, 17 June 2002 4:52 PM
To: struts-user@jakarta.apache.org
Subject: forming a query string in struts...


Hi All,

how can we form a dynamic query string in struts...??


----anjali

Power your enterprise with custom solutions in eLearning and Knowledge
Management from NIIT - Knowledge Solutions. For details visit our website
http://www.ksb.niit.com

___________________NOTICE____________________________
This electronic mail transmission contains confidential information intended
only for the person(s) named.  Any use, distribution, copying or disclosure
by any other person is strictly prohibited. If you received this
transmission in error, please notify the sender by reply e-mail and then
destroy the message.  Opinions, conclusions, and other information in this
message that do not relate to the official business of NIIT shall be
understood to be neither given nor endorsed by NIIT When addressed to NIIT
clients, any information contained in this e-mail is subject to the terms
and conditions in the governing client contract.

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>