You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sony Thomas <so...@genialgenetics.com> on 2006/02/17 10:49:44 UTC

Cannot use Scriptlet inside ditchnet tabs - passing more than one parameters from jsp to action - please give some guidance

Hi friends,

I am using ditchnet tabs in my project. I want to pass more than one 
parameter through a link to my action class. I have used the following 
code to pass the parameters.

<%  
                                    java.util.Map paramMap = new 
java.util.HashMap();
                                    paramMap.put("id",id);
                                    paramMap.put("locationId",locationId);
                                    
paramMap.put("parentChildTracker",parentChildTracker);
                                    paramMap.put("forwardURL",forwardURL);
                                    
pageContext.setAttribute("paramMap",paramMap);
                                %>



But ditchnet tabs will not allow scriptlets inside the tabs. Is there is 
any other way to pass more than one parameters to Action class. I am 
stuck in something. So if anyone can send some clues or links that will 
be helpful. Or some code example.

Thanks in advance,


Sony

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Cannot use Scriptlet inside ditchnet tabs - passing more than one parameters from jsp to action - please give some guidance

Posted by Laurie Harper <la...@holoweb.net>.
Sony Thomas wrote:
> Hi friends,
> 
> I am using ditchnet tabs in my project. I want to pass more than one 
> parameter through a link to my action class. I have used the following 
> code to pass the parameters.
> 
> <%                                     java.util.Map paramMap = new 
> java.util.HashMap();
>                                    paramMap.put("id",id);
>                                    paramMap.put("locationId",locationId);
>                                    
> paramMap.put("parentChildTracker",parentChildTracker);
>                                    paramMap.put("forwardURL",forwardURL);
>                                    
> pageContext.setAttribute("paramMap",paramMap);
>                                %>
> 
> 
> 
> But ditchnet tabs will not allow scriptlets inside the tabs. Is there is 
> any other way to pass more than one parameters to Action class. I am 
> stuck in something. So if anyone can send some clues or links that will 
> be helpful. Or some code example.

I don't know anything about ditchnet tabs, but you can replace your 
scriptlet with JSTL tags something like this (untested):

<jsp:useBean var="params" type="java.util.HashMap"/>
<c:set name="params" property="id" value="${id}"/>
...

I'm sure I have the syntax wrong, but see the JSTL documentation and you 
should be able to figure it out.

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org