File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes very un-natural problem with login:equal tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "very un-natural problem with login:equal tag" Watch "very un-natural problem with login:equal tag" New topic
Author

very un-natural problem with login:equal tag

raminaa niilian
Ranch Hand

Joined: Jul 14, 2005
Posts: 550
Hi
I have a un-natural problem here

Im trying to use :


it never enter the above block.
even i tried and showed sysvar by using the following code line in the browser

I can see that its value
is loop bu there is no luck to enter the above block.
No my question is :
while the value that is inside sysvar is equal to what Im checking with Struts logic tag , why it never enter the block ?
is it an encoding problem ?

can some one please tell me how to write that conditional block in JSTL ?
maybe JSTL Do it correctly.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
In order for a variable to be recognized by either a struts logic:xxx tag or a JSTL tag, it must be in one of the scopes.(page, request, session or application).

Try putting the following code somewhere before your logic:equal tag.

<% pageContext.setAttribute("sysvar", sysvar); %>

To answer your second question: The equivalent JSTL tag is:

<c:if test='${sysvar == "loop"}'>
</c:if>


Merrill
Consultant, Sima Solutions
 
Consider Paul's rocket mass heater.
 
subject: very un-natural problem with login:equal tag
 
Similar Threads
Help with the tag library..
Getting the List size in JSP
JSTL forEach tag in struts problem
JSTL <c:forEach .../> tag not working with collection
Struts 1 -- Wrong data displaying in my JSP page