Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Struts mapping action to action???

Reply
Thread Tools

Struts mapping action to action???

 
 
runescience
Guest
Posts: n/a
 
      02-06-2006
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.ResponseInitActi on"
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.

 
Reply With Quote
 
 
 
 
spmion@gmail.com
Guest
Posts: n/a
 
      02-07-2006
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.

 
Reply With Quote
 
 
 
 
runescience
Guest
Posts: n/a
 
      02-07-2006
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.

 
Reply With Quote
 
runescience
Guest
Posts: n/a
 
      02-07-2006
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding action mapping to struts-config file in struts ros Java 0 05-15-2007 10:51 AM
[Struts] action mapping to jsp pages under WEB-INF mlubino@gmail.com Java 1 02-24-2007 04:02 AM
Struts - get action mapping name Hgjhghjgjhg Hgjhghjg Java 1 07-19-2004 08:47 AM
struts action url mapping that allows to split actions into restricted and unrestricted Pavel Java 1 11-14-2003 03:23 PM
struts action mapping input attribute - dynamic value ? Pavel Java 2 10-20-2003 04:33 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57