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
scriptlets to tags
shah rah
Ranch Hand
Posts: 124
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Employee emp = (Employee)session.getAttribute("empInfo");
=emp.getName()
I have scriplets on my page and I would like to use tags. How to do the above using
struts
tags?. appreciate your help
Nick Williamson
Ranch Hand
Posts: 73
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
you'll probably want JSTL tags as well.
http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/c/tld-summary.html
once you import that you can do something like this.
Employee Name: <c :-o ut value="${sessionScope['empInfo'].name}"/> or if you are using servlet >= 2.4 you can just use el in your jsp: Employee Name: ${sessionScope['empInfo'].name}
[ May 18, 2007: Message edited by: Nick Williamson ]
[ May 18, 2007: Message edited by: Nick Williamson ]
shah rah
Ranch Hand
Posts: 124
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks, I would like to know how to do this using struts tag
Merrill Higginson
Ranch Hand
Posts: 4864
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
<bean:write name="empInfo" property="name" scope="session" />
The
scope="session"
is optional. If it's not provided, Struts will search in all scopes for a bean named "empInfo".
Merrill
Consultant,
Sima Solutions
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Urgent : help needed is XSLT
TCS walk in in blore
how comparator works?
hibernate 1-many insertion
Back to the Financial sector
More...