Describe the struts specific form tag?
Instead of using the standard HTML Form tag, like most HTML pages, the struts specific Form tag is :
<html:form action="" name="" type="">
This tag with its subordinate input tags, encapsulates Struts form processing. The Form tag attributes are :
* action : Represents the URL to which this form will be submitted. This is also used to find the appropriate ActionMapping in the Struts configuration file.
* name : Identifies the key that is used to lookup the appropriate ActionForm that will represent the submitted form data.
* type : Names the fully qualified classname of the form bean you want to use in this request.
To use the struts specific <html:form> tag you have to use the taglib directive:
<%@ taglib uri="WEB-INF/struts-html.tld" prefix="html" %>Reply
How will you install struts framework in your web application?
The follwing steps are involved to install struts framework in your web application :
* Uncompress the Struts Archive to your local disk.
* Create a new web Application say, MyStrutsApp inside the webapps directory under the tomcat directory.
* Copy all the jar files, extracted from the lib directory into the /webapps/MyStrutsApp/WEB-INF/lib directory.
* Create an empty web.xml file and copy it to the /webapps/MyStrutsApp/WEB-INF/ directory.
* Create an empty struts-config.xml file and copy it to the /webapps/MyStrutsApp/WEB-INF/ directory. The struts-config.xml file is the diployment descriptor for all Struts applicattion. It is the file that glues all of the MVCcomponents together.Reply
What are the various steps involved in the implementaion of struts?
The struts framwork models its server side implementation of the MVC using a combination of JSPs, custom JSP tags, and a Java Servlet. It involves the following steps :
* The incoming request is received by the ActionServlet, which acts as the controller, and the ActionServlet looks up the requested URI in an XML file.
* The ActionClass performs its logic on the Model components associated with the application.
* Once the Action has completed its processing, it returns control to the ActionServlet with a key that indicates the result of its processing. ActionServlet uses this key to determine where this result should be forwarded for presentation.
* The request is complete when the ActionServlet response by forwarding the request ot the view that was linked to the returned key, and this view presents the result of the Action.Reply
What is struts?
The Jakarta struts project, an open source project supported by the Apache software Foundation, is a server side java implementation of the modetl view controller (MVC) design pattern.
The struts framework designed to create Web application that easily separate the presentation layer and allow it to be abstracted from the transaction and data layers.Reply