Richard J Barton

Greenhorn
+ Follow
since Feb 07, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Richard J Barton

thanks. I got it now.
In a link action=desiredAction
In a form a button with a name of action and a value of desiredAction.
12 years ago
OK. I get it now. To call a specific action, you would append to a link something like ?action=desiredAction.

In a form you would put a button with a name of action and a value of the desired action/

thanks.
My bad.
ActionServlet is in com.javaranch.common and I was told to use this for lesson 4 of servlets.
I posted a similar question. what parameter is set in the jsp?
12 years ago
Hi guys,
I am somewhat confused by the javadoc for ActionServlet. It says this about the addActionHandler method:
addActionHandler

public void addActionHandler(java.lang.String actionKey,
ActionServlet.ActionHandler actionHandler)

Override init and call this method for every action to be implemented.

Parameters:
actionKey - The text that will be sent in the servlet parameter to kick off this action.

What exactly is the actionKey and how do I present it to the servlet?