I'm fairly new to struts, so this might be a trivial question. I have an action as follows:

public class MyAction extends Action {
 public ActionForward execute( /* ... */ ) {
   return mapping.findForward( "success" );
 }
}

And a form:

public class MyForm extends ActionForm {
 private String _id;
 // getter, setter, and reset
}

I use the form as follows:

<script type="text/javascript">
 function onDoSomething() {
   document.myForm.id = "...";
   document.myForm.submit();
 }
</script>

<!-- ... -->

<html:form action="/myAction"><html:hidden property="id"/></html:form>

And in my struts-config.xml:

<form-bean name="myForm" type="test.MyAction"/>
<!-- ... -->
<action path="/myAction" type="test.MyAction" name="myForm" scope="session" validate="false">
 <forward name="success" path="/newpage.jsp" redirect="true"/>
</action>

Finally, I want to get the value in newpage.jsp. I've tried something like this:

<jsp:useBean id="myForm" class="test.MyForm" scope="session"/>

Basically, I need to access the form object I submitted through /myAction in the newpage.jsp, such that it's available to the EL. How would I do this? (the above <jsp:useBean.../> simply instantiates a new form bean, which is obviously bad).

Thanks,
 Scott


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

Reply via email to