This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
In my jsp am having 3 submit buttons, If i click one submit button it should go to the particular method in the Action class and display the data that is hard coded data in the Action class. If i click second submit button it should go to that particular method in the Action class and display the data that is hard coded data in the Action class etc. How can i go to the particular method in Action class from the jsp when i click submit button? Please give me some suggestions..
ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
To deal with the above scenario struts1 provides two classes DispatchAction and LookupDispatchAction.
Refer to the below mentioned link for details(For DispatchAction):
Click Here If you need any further explanation reply back.
Take up one idea. Make that one idea your life; dream of it; think of it; live on that idea. Let the brain, the body, muscles, nerves, every part of your body be full of that idea, and just leave every other idea alone. This is the way to success.
Joined: Mar 18, 2012
Actually am having a small doubt, we normally write <form action="someaction"> tag in the jsp..
That means after submitting the form it will go to the particular action which is specified in the "action" attribute.
Now on clicking each submit button it will go to particular action method that is specified in the onclick attribute..
Now my doubt is what should i write in the action attribute of form which containing 3 submit buttons?
Yes, your right and this is a not a small doubt also.
If you go through the documentation then may be you get your answer so easily.
So please once go to struts documentation and search struts predefined classes.
There are two classes that is DispatchAction and LookUpdispatchAction class which is help you to clear your doubt.