Here is my code:
<% request.setAttribute(\"lcItem\", \"Hello\"); %>
If I do as following, I\'m not getting the value:
You can write your code 2 ways
<% request.setAttribute("lcItem", "Hello"); %>
<% pageContext.setAttribute("lcItem", "Hello"); %>
then if you want to access these values in Struts2 Components you might use #attr. as prefix.
Example
Note: It will work fine with request and "pageContext".
will not work because "lcItem" is not available in the Value Stack.