GeeCON Prague 2014*
The moose likes Struts and the fly likes scriptlets to tags Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "scriptlets to tags" Watch "scriptlets to tags" New topic
Author

scriptlets to tags

shah rah
Ranch Hand

Joined: Jan 04, 2007
Posts: 124
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

Joined: Jan 06, 2007
Posts: 73
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

Joined: Jan 04, 2007
Posts: 124
Thanks, I would like to know how to do this using struts tag
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864

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
 
GeeCON Prague 2014
 
subject: scriptlets to tags