This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
For this I will put some pointers,
1. bean:write uses beans "name", so you have a bean object. (Be careful about the scope)
2. On bean object, you know how to call its property method, like myBean.getProperty(); in scriptlet
I have a list object set in the request as an attribute which contains all the details about the users of an application, in JSP am displaying the list of the users using <logic:present>, <logic:iterate> and <bean:write> this is working fine but the problem is there when I have to apply some if() condition, for this I have to make use of the <bean:write> value inside the scriptlet.
I didn't get it. You can do whatever you want to do in scripltlet, whether its is if conditions or for loops. My previous post provides some hints on how to get the bean values in scriptlet. Its straightforward, accessing bean using tags OR using same bean "name" in scripltet is same (look for the resultant _jsp Java code), but later use is discouraged.
Anutosh Swamy wrote:..the problem is there when I have to apply some if() condition, for this I have to make use of the <bean:write> value inside the scriptlet.
You can have an JSTL's c:if tag OR you can use logic:equal tag.