DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23140>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23140

Can get the session in the ActionForm constructor





------- Additional Comments From [EMAIL PROTECTED]  2003-09-14 17:15 -------
This is not a very good idea IMHO, as it promotes the practice of using JSP 
pages which are accessed directly (not via the controller) -- a practice which 
the Struts common wisdom recommends against.

Also, Struts is not necessarily used with JSP pages nor HTTP requests; you 
cannot simply assume the HttpSession to be available.

If, in spite of the above, you wish to access the session from the ActionForm, 
there are many ways to do so. You can plant the relevant code in the JSP page 
directly; you can use a custom tag of your own in the page; you can extend 
html:form, which would be responsible for creating the ActionForm in these 
circumstances.

I would like to point out that ActionForm is currently an empty interface; if 
you change it to allow the extra calls necessary for the session to be 
accessible from it, you will break tons of existing code.

I am not a committer, so I don't feel confident enough to close this bug, but I 
recommend that it be resolved as invalid.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to