It seems like a workaround but you can use attr
to evaluate string.
<s:set var="myNum" value="numConst" />
<s:set var="number" value="'@xxx.CommonConstant@'+#myNum" />
<s:property value="#attr[#number]"/>
<s:if test="#attr[#number] == 9">
do something
</s:if>
More Related Contents:
- Passing parameters to action through ModelDriven in Struts 2
- What’s the difference between # , % and $ signs in Struts tags?
- Struts2: Updating the values of a “List Of Objects” inside a Map
- Struts 2 : There is no Action mapped for namespace [/]
- How can I set the welcome page to a struts action?
- Struts2 jQuery plugin java.lang.ClassNotFoundException: org.apache.struts2.views.TagLibrary
- Unable to get Struts2 Hello World to work using Eclipse and Maven
- Struts Web Application: Reusable Validation Client-Side & Server-Side
- Should I retrieve database record in Struts2 view layer?
- Is there a way to redirect to another Action class without using on struts.xml
- Unable to implement Struts 2 token interceptor with hyperlink
- Upload multiple files in Struts2 with Dropzone.js
- Editing ArrayList of objects with struts 2 form tag
- Struts 2 select tag with values of a array list
- Populating one select menu based on another select menu using AJAX in Struts2
- Avoid duplicate submission of Struts 2 jsp page
- Design Patterns web based applications [closed]
- What causes “java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name ‘command’ available as request attribute”?
- Redirect to an external URL from controller action in Spring MVC
- Exception starting filter struts2 – tried adding JAR’s, but same result
- How do I get whole and fractional parts from double in JSP/Java?
- Spring Boot JSP 404
- How to change Java version used by TOMCAT?
- How to upload files on server folder using jsp [duplicate]
- Access Enum value using EL with JSTL
- Why after logout clicking back button on the page displays previous page content?
- How to pass parameter to jsp:include via c:set? What are the scopes of the variables in JSP?
- Redirecting back to actual page what they were viewing before login
- calling java method in javascript [closed]
- Filter mapping for everything to Struts2 besides one servlet?