Pankaj Gupta wrote:
Hi All,
I am passing parameters to my JSP like:
<forward name="successActive" path="/hello.jsp?isActive=true"
contextRelative="false"/>
and reading the parameter using logic:present tag which is not working:
<logic:present name="isActive"> < bean:message key = "activeTitle"/>
</logic:present>
However if I do the same thing using scriptlets:
<% if(request.getParameter("isActive") != null
&& request.getParameter("isActive").equals("true") )
%>
< bean:message key = "activeTitle"/>
It works well. Please suggest what I am doing wrong.
regards,
Pankaj
Per the logic:present tag documentation [1], the 'name' attribute checks
for a bean in some scope with the given name. You're trying to check for
a request parameter, so you should be using the 'parameter' attribute
instead of 'name'.
L.
[1] http://struts.apache.org/1.2.x/userGuide/struts-logic.html#present
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]