File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes adding a value to bean:write property= Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "adding a value to bean:write property="???"" Watch "adding a value to bean:write property="???"" New topic

adding a value to bean:write property="???"

satish jupalli

Joined: Apr 06, 2003
Posts: 10
Hi all,

I want to concatenate the empFirstName with empno and set it as a property for bean:write. please suggest me a way out after having look at the following code.

<c:forEach var="empNo" begin="1" end="${numberOfEmployees}">

<bean:write name="EmpInfoForm" property="empFirstName (concatinate the empNo here so that it will become a property)" filter="true" />


Is there is any way i can do it, without writing a separate scriptlet.

something like
<bean:write name="EmpInfoForm" property=
"empFirstName${empNo} " filter="true" />

Thx in advance.
alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
i think you missed the basic of c:forEach and c ut using simple Collection and java beans. you are forcing iteration through counter index instead of using the iterators supported by JSTL. please see for better approaches.

-/a<br />certified slacker...yes, my last name is 'do' - <a href="" target="_blank" rel="nofollow"></a>
I agree. Here's the link:
subject: adding a value to bean:write property="???"
It's not a secret anymore!