You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "D, Gopinath (MED)" <Go...@geind.ge.com> on 2002/12/12 09:29:09 UTC

Form Bean Scope.

Hi,

I'm new to Struts, needed immediate help.

How to set the scope of formbean to be session, so that it can be called
from other Jsps also. I know i'm not clear. !!

Ok, here is in details.

BasicSearh.jsp(attached to basicSearchBean) submit calls basicSearchAction
and fwds to searchResults.jsp. In searchResults.jsp i'm calling the
basicSearchAction again with different start & end parameters. In this case
basicSearhBean goes as null. Can some one help me out on this fast.

Here is the code.

<form-bean  name="basicSearchForm"
	type="examples.struts.actionform.BasicSearchForm">
</form-bean>

<action path="/basicSearch"
type="examples.struts.action.BasicSearchAction"
name="basicSearchForm"
scope="session"
input="/basicSearch.jsp">
<forward name="success" path="/searchResults.jsp"/>
<forward name="failure" path="/basicSearch.jsp"/>
</action>

<action path="/searchResults"
type="com.ge.med.efmea.struts.action.SearchResultsAction">
</action>

searchResults.jsp has code similar to this.

Page results : <A HREF="basicSearch.do?startRecord=11&recordsRequired=10">
Next </A>

Thanks in advance,
Gopi


"THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
ADDRESSEE and may contain confidential and privileged information.
If the reader of this message is not the intended recipient,
you are notified that any dissemination, distribution or copy of this 
communication is strictly Prohibited. 
If you have received this message by error, please notify us 
immediately, return the original mail to the sender and delete the 
message from your system."


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>