Easiest way to pass multiple parameters on a html link.

Use the standard anchor tag.


eg:

        <a href="SomeAction.do?empid=<bean:write 
name="myForm" 
property="<%=\"emp[\"+i+\"].empId\"%>"/>&salary
nce=<bean:write name="myForm" 
property="<%=\"empList[\"+i+\"].salary\"%>"/>">

Here the myForm should have indexed getters for empBean....

Clas MyForm(){
        List empList = new ArrayList();
        getEmp(int index){
        while(empList.size< index){
                empList.add(new EmpBean());
        }
        return (EmpBean)empList.get(index);
        }
}




Very, very ugly but works just fine!

I think the struts way(using map....)is not very easy alwqys...


-----Original Message-----
From: garyd [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 3:44 AM
To: struts-user
Cc: garyd
Subject: html:link tag


Anyone know if/how to add multiple query parameters using this tag?

ie: www.myserver.com/foo.jsp?id=1&bar=2...

Thanks,
Gary

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to