struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank W. Zammetti" <fzli...@omnytex.com>
Subject Re: How to access the ActionForm in a JSP?
Date Tue, 04 Sep 2007 13:31:24 GMT
You can find the form as a request attribute with the same name you used 
in your config file, so:

MyActionForm form = (MyActionForm)request.getAttribute("myFormName");

Frank

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: fzammetti@hotmail.com
Author of "Practical Ajax Projects With Java Technology"
  (2006, Apress, ISBN 1-59059-695-1)
and "JavaScript, DOM Scripting and Ajax Projects"
  (2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
  Supplying the wheel, so you don't have to reinvent it!

REMIJAN, MICHAEL J [AG/1000] wrote:
> Newbie question here.  Suppose I have action, "helloworld.action"  which
> I use to grab a bunch of data I wish to display on a JSP page.  My
> question is how do get a reference to that action object in the JSP
> page?  The tutorials on the Struts2 website showed examples using <form
> /> tags, but I don't need to use <form /> tags.  I just want to display
> data.
> 
> Michael J. Remijan
> 
> 
> ---------------------------------------------------------------------------------------------------------
> This e-mail message may contain privileged and/or confidential information, and is intended
to be received only by persons entitled to receive such information. If you have received
this e-mail in error, please notify the sender immediately. Please delete it and all attachments
from any servers, hard drives or any other media. Other use of this e-mail by you is strictly
prohibited.
> 
> 
> All e-mails and attachments sent and received are subject to monitoring, reading and
archival by Monsanto. The recipient of this e-mail is solely responsible for checking for
the presence of "Viruses" or other "Malware". Monsanto accepts no liability for any damage
caused by any such code transmitted by or accompanying this e-mail or any attachment.
> ---------------------------------------------------------------------------------------------------------
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.485 / Virus Database: 269.13.3/986 - Release Date: 9/3/2007 9:31 AM


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message