|
|
|
| HOME | J2ME | Struts | AJAX | SOAP | SOA | MEDIA STREAMING | AXIS | | |
|
|
Struts for Beginners: Accessing Action Forms from JSP PagesBack | Tutorial Home | Next Action Forms can be accessed from the JSPs using tags-bean tag library. The below section describes the procedure to display values of the bean LoginForm.java in the JSP page. Add attribute tag to the action mapping. The parameter attribute sets
the LoginForm(aliased as userLoginForm in the bean defination) object
to be in session scope and can be accessed from JSP pages. The value of the attribute parameter i.e. loginBean will now become the alias for LoginForm bean and can be accessed from any JSP page using <bean: write> tag. <bean:write name="loginBean" property="userName" />Make sure the required tag lib is imported. <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> Complete code of loginStatus.jsp
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"
%> Back | Tutorial Home | Next site comments powered by Disqus |
|
| toolbar powered by Conduit |
|
| Copyright © 2009. All rights reserved | Terms and Conditions | About | Contact | Feed Back | |