This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Just wondering if something like this is legal in strut2:
even though, while debugging, i can see that course.index and someVar are the same value, the if condition doesn't trigger.
is it not possible to compare the status index with a jsp variable?
sorry, but a question like that doesn't even begin to help.
anyways, disregard the question - downloaded struts2 and xwork src, debugged and found out that the s:if test construct will only take specific literal or predefined constants.
The "test" attribute will take any valid OGNL expression, which can be constants, literals, method calls, expressions, etc.
The point was that there's almost *never* any reason to use a scriptlet variable in this fashion, and that by answering the question and showing *why* you wanted to use a scriptlet variable for this, you might have learned a better way to do it.