Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2006

Tip: Looking for answers? Try searching our database.

Struts mapping action to action???

Thread view: 
runescience - 06 Feb 2006 23:20 GMT
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.
spmion@gmail.com - 07 Feb 2006 04:29 GMT
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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.