Categories:
.NET (357)
C (330)
C++ (184)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (2)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Struts (1)
Windows (1)
XHTML (173)
Other Resources:
Can you write a simple Action Class
Can you write a simple Action Class?
✍: Guest
Sure. Here is the code of Action Class that returns the ActionForward object:
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;br>
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
public class TestAction extends Action {
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
return mapping.findForward(\"testAction\");
}
}
2007-12-19, 6414👍, 0💬
Popular Posts:
How do you pass control from one JSP page to another? Use the following ways to pass control of a re...
How To Truncate an Array? - PHP Script Tips - PHP Built-in Functions for Arrays If you want to remov...
How do you locate the first X in a string txt? A) txt.find('X'); B) txt.locate('X'); C) txt.indexOf(...
What is synchronization and why is it important? With respect to multithreading, synchronization is ...
What is Shell scripting A shell script is a script written for the shell, or command line interprete...