Interview Question: Write code of any Action Class?

By: Ash Printer Friendly Format    

Question:Write code of any Action Class?


Here is the code of Action Class that returns the ActionForward object.
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
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\");





Most Viewed Articles (in Interview )

Question: What is a Hidden Comment in JSP?

Interview Question: How do I install Struts?

Differentiate between .ear, .jar and .war files.

Name the containers which uses Border Layout as their default layout?

What is similarities/difference between an Abstract class and Interface?

Interview Question: What is Struts?

Interview Question: How is the MVC design pattern used in Struts framework?

Interview Question: Is Struts compatible with other Java technologies?

Interview Question: Where can I get a copy of Struts?

Interview Question: Why aren't the Struts tags maintained as part of the Jakarta Taglibs project ?

Interview Question: What about JSTL and JavaServer Faces ?

Interview Question: Can i map more than one table in a CMP?

Interview Question: What is the difference between EAR, JAR and WAR file?

Interview Question: What is the difference between find and select methods in EJB?

Interview Question: What is the difference between Message Driven Beans and Stateless Session beans?

Latest Articles (in Interview)

Comment on this tutorial