Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

scriptlets to tags

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.



[ May 18, 2007: Message edited by: Nick Williamson ]
[ May 18, 2007: Message edited by: Nick Williamson ]
 
shah rah
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, I would like to know how to do this using struts tag
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The scope="session" is optional. If it's not provided, Struts will search in all scopes for a bean named "empInfo".
reply
    Bookmark Topic Watch Topic
  • New Topic