Hi Mark! I replaced the line
<result type="redirect-action">Display</result> with <result name="success">/crosseyed/Display.jsp</result> as you suggested, and now it works :) Thank you for all your help!! Mark Menard wrote: > > On 12/2/06 10:45 AM, "fahlen" <[EMAIL PROTECTED]> wrote: > >> >> Hi Mark, >> >> I've tried this now, but I'm unable to access the data from the JSP. In >> the >> struts.xml configuration file, the action involved is configured this >> way: >> >> <action name="Search_*" method="{1}" class="crosseyed.Search"> >> <result name="input">/crosseyed/Search.jsp</result> >> <result type="redirect-action">Display</result> >> </action> >> >> I.e. Search.jsp -> Search action class -> Display.jsp >> >> On the Search.jsp page, one can enter some keywords. The Search action is >> then executed, after which one is redirected to the Display.jsp which >> would >> display the results (data received from the session bean). I've tried >> setting the value of the Search action property I'm trying to access from >> Display.java to a constant value, but even then nothing is output in the >> JSP. I'm the syntax you specified in your reply: >> >> <s:property value="%{dataFromSessionBean}" /> >> >> The dataFromSessionBean has it's getter and setter methods defined. > > So, just so I'm clear, on your crosseyeed.Search class you have a > setDataFromSessionBean() a getDataFromSessionBean() method? > > Now you're also just trying to get from Search.jsp to Display.jsp with > Search action in the middle right? If yes, try changing the: > > <result type="redirect-action">Display</result> > > to: > > <result name="success">/crosseyed/Result.jsp</result> > > And just return "seccess" from your execute() method after you have > populated dataFromSessionBean. > >> My spontaneous question is if one has to define somewhere (such as in the >> struts.xml file) that the action object be placed on some stack. Or do I >> have to define the name of the Action also, when using the s:property >> tag? >> I've tried various other ways, like <s:property >> value="%{Search.dataFromSessionBean}" /> among others, but none works. > > You don't have to define anything in the struts.xml file. The action > instance is always pushed onto the stack, and is usually the top bean on > the > stack, unless you are using the ModelDriven method. > > Mark > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Struts-2-and-passing-data-using-interceptors-tf2734105.html#a7666816 Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]