greetings. I want to go from a logon page to an action page that
decides whether the user gets an edit page, or a new page with blank
fields.
.jsp
form action="/ResponseInit" method="get"
struts-config.xml
=======
<action path="/ResponseInit"
type="com.mycompany.struts.action.ResponseInitAction"
name="LogonFormBean"
scope="request">
<forward name="SortRetrieve" path="/NewRegister.jsp"/>
<forward name="SortRetrieve" path="/EditRegister.jsp"/>
</action>
In the action execute i will check the DB for logon and password, and
then foward to an Edit register page.
But, i seem to get fowarded to my page with nothing in the fields.
What do I do?
How do I do it?
Is there a good example of this. The one built into the struts
downloade example 1.2.7 was a bit confusing.
I see a couple of issues with your struts-config entry. First, and I'm
sure this is just a typo in your posting, is the fact that you have
named your forwards the same ("SortRetrieve"). You probably want to
name them differently. Secondly, the forward path should point to a
*.do reference (if *.do is what you have mapped to the Struts servlet)
instead of a *.jsp reference. Doing so will allow you to pre-populate
your ActionForm bean with the necessary information prior to loading
the page.
runescience - 07 Feb 2006 16:06 GMT
thank you very much for your help. And yes it was a typo.
I want to research what you described on the internet and my book.
I have the husted: struts in action book. Ive been looking for it, but
I probably keep missing it.
What do you call this: fowarding to an action? <something i can look up
and research on the internet?
Thank you for your help again.
runescience - 07 Feb 2006 16:07 GMT
thank you very much for your help. And yes it was a typo.
I want to research what you described on the internet and my book.
I have the husted: struts in action book. Ive been looking for it, but
I probably keep missing it.
What do you call this: fowarding to an action? <something i can look up
and research on the internet?
Thank you for your help again.