Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Struts
assign value of bean:write in variable
natasa jones
Ranch Hand
Posts: 45
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi all!
i would like to ask how i could assign the value of
a bean write tag to a
String
named for example lastName in my
jsp
page.
something like
<% String lastName=> <bean:write name="myUser" property="lastname"></bean:write> <%; %>
doesnt work.
any thoughts?
alan wamser
Ranch Hand
Posts: 41
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The bean:write you have listed it looking for a
java
bean called myUser, and is going to call the mething getlastname().
Purushoth Thambu
Ranch Hand
Posts: 425
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You need to use bean : define and bean : write tags.
eg:
<bean:define id="userName" scope="request"> <bean:write name="userInfo" property="userName"/> </bean:define> ... <%= userName %>
[ September 05, 2006: Message edited by: Purushothaman Thambu ]
Consider Paul's
rocket mass heater
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
displaying data from arrays with html:text
how to assign bean value to jsp variable
No getter method for property
problem with html:text prpperty value=bean:write
Get FormBean's property in JSP page.
More...