Struts Interview Questions and Answers - Freshers & Experienced!

Explain Struts.

Struts is open source software used to develop java based web page.

- Struts uses Jakarta Packages, Java Servlets, JavaBeans, ResourceBundles, and XML.

- Struts takes the help of Model View Controller (MVC) architecture. Where Model is referring to business or database, View is referring to the Page Design Code, and Controller is referring to navigational code.

What is Action Class?

- An Action class in the struts application is used to handle the request.

- It acts as interface or communication medium between the HTTP request coming to it and business logic used to develop the application.

- Action class consists of RequestProcessor which act as controller. This controller will choose the best action for each incoming request, generate the instance of that action and execute that action.

- This should be in thread-safe manner, because RequestProcessor uses the same instance for numbar of requests at same time.

What is Struts Validator Framework?

- Struts Validator Framework enables us to validate the data of both client side and server side.

- When some data validation is not present in the Validator framework, then programmer can generate own validation logic, this User Defined Validation logic can be bind with Validation Framework.

- Validation Framework consist of two XML configuration Files:
1. Validator-Rules.xml file
2. Validation.xml file

What is the need of Struts?

We need Struts in Java because of following reasons:

- Helps in creation and maintenance of the application.

- Make use of Model View Controller (MVC) architecture. Where Model is referring to business or database, View is referring to the Page Design Code, and Controller is referring to navigational code.

- Enables developer to make use of Jakarta Packages, Java Servlets, JavaBeans, ResourceBundles, and XML.

What are the classes used in Struts?

Struts Framework consists of following classes:

Action Servlets: Used to control the response for each incoming request.

Action Class: Used to handle the request.

Action Form: It is java bean, used to referred to forms and associated with action mapping.

Action Mapping: Used for mapping between object and action.

Action Forward: Used to forward the result from controller to destination.

How exceptions are handled in Struts application?

Exceptions are handled in struts by using any one of the following two ways:

Programmatically handling: In this exception are handled by using try and catch block in program. Using this programmer can define how to handle the situation when exception arises.

Declarative handling: In this exception handling is done by using the XML file. Programmer defines the exception handling logic in the XML file. There are two ways of defining the exception handling logic in the XML file:
- Global Action Specific Exception Handler Definition.
- Local Action Specific Exception Handler Definition.

What is MVC?

Model View Controller (MVC) is a design pattern used to perform changes in the application.

Model: Model is referring to business or database. It stores the state of the application. Model has no knowledge of the View and Controller components.

View: View is referring to the Page Design Code. It is responsible for the showing the result of the user’s query. View modifies itself when any changes in the model happen.

Controller: Controller is referring to navigational code. Controller will chose the best action for each incoming request, generate the instance of that action and execute that action.

Describe Validate() and reset() methods.

Validate() Method:

- This method is used to validate the properties after they are explored by the application.
- Validate method is Called before FormBean is handed to Action.
- This method returns a collection of ActionError.

Syntax :
public ActionErrors validate(ActionMapping mapping,HttpServletRequest request)

Reset() Method:

- This method is called by the Struts Framework with each request that uses the defined ActionForm.
- Used to reset all the data from the ActionForm.

Syntax :
public void reset() {}

What design patterns are used in Struts?

There are following types of design patterns are used in Struts:

- Service to Worker
- Dispatcher View
- Composite View (Struts Tiles)
- Front Controller
- View Helper
- Synchronizer Token

What is the difference between session scope and request scope when saving FormBean?

The difference between session scope and request scope when saving FormBean are following:

- In Request Scope, values of FormBean are available to current request but in Session Scope, values of FormBean are available throughout the session.

What is the different actions available in Struts?

The different kinds of actions in Struts are:

- ForwardAction
- IncludeAction
- DispatchAction
- LookupDispatchAction
- SwitchAction

What is DispatchAction?

- The DispatchAction enable the programmer to combine together related function or class.

- Using Dispatch Action programmer can combine the user related action into a single UserAction. like add user, delete user and update user.

- DispatchAction execute the action based on the parameter value it receives from the user.

How to use DispatchAction?

We can use the Dispatch Action we executing following steps:

- Create a class that extends DispatchAction.
- In a new class, add a method: method has the same signature as the execute() method of an Action class.
- Do not override execute() method.
- Add an entry to struts-config.xml

What is the difference between ForwardAction and IncludeAction?

The difference between ForwardAction and InculdeAction are:

- IncludeAction is used when any other action is going to intake that action whereas ForwardAction is used move the request from one resource to another resource.

What is difference between LookupDispatchAction and DispatchAction?

The difference between LookupDispatchAction and DispatchAction are given below:

- LookupDispatchAction is the subclass of the DispatchAction.
- Actual method that gets called in LookupDispatchAction whereas DispatchAction dispatches the action based on the parameter value.

What is LookupDispatchAction?

- The LookupDispatchAction class is a subclass of DispatchAction.
- The LookupDispatchAction is used to call the actual method.
- For using LookupDispatchAction, first we should generate a subclass with a set of methods.
- It control the forwarding of the request to the best resource in its subclass.
- It does a reverse lookup on the resource bundle to get the key and then gets the method whose name is associated with the key into the Resource Bundle.

What is the use of ForwardAction?

- The ForwardAction is used when we want to combine Struts with existing application.
- Used when we want to transfer the control form JSP to local server.
- Used to integrate with struts in order to take benefit of struts functionality, without writing the Servlets again.
- Use to forward a request to another resource in your application.

What is IncludeAction?

The IncludeAction is used to integrate the one action file in another action file.

- It is same as ForwardAction but the only difference is that the resource is present in HTTP response.
- Is used to combine the Struts functionality and control into an application that uses Servlets.
- Use the IncludeAction class to include another resource in the response to the request being processed.

What are the various Struts tag libraries?

The various Struts tag libraries are:

HTML Tags: used to create the struts input forms and GUI of web page.

Bean Tags: used to access bean and their properties.

Logic Tags: used to perform the logical operation like comparison.

Template Tags: used to changes the layout and view.

Nested Tags: used to perform the nested functionality.

Tiles Tags: used to manages the tiles of the application.

What is the life cycle of ActionForm?

The lifecycle of ActionForm is as follows:

- Retrieve or Create Form Bean associated with Action.
- "Store" FormBean in appropriate scope (request or session).
- Reset the properties of the FormBean.
- Populate the properties of the FormBean.
- Validate the properties of the FormBean.
- Pass FormBean to Action.

What are the loop holes of Struts?

The drawbacks of Struts are following:

- Absence of backward flow mechanism.
- Only one single controller Servlets is used.
- Bigger learning curve.
- Worst documentation.
- No exception present in this framework.
- Less transparent.
- Rigid approach.
- With struts 1, embedding application into JSP can’t be prevented.
- Non-XML compliance of JSP syntax.

Difference between Html tags and Struts specific HTML Tags

Difference between HTML tag and Struts specific HTLM tags are:

- HTML tags are static in nature but Struts specific HTML tags are dynamic in nature.

- HTML tags are not User Defined whereas Struts tags can be user defined.

- HTML tags provide the different templates and themes to the programmer whereas Struts specific HTML tag provides the integrating the property value with the Formbean properties.

- HTML tags are integral part of Struts whereas Struts have HTML tag libraries.

What is the difference between session scope and request scope when saving FormBean?

The difference between session scope and request scope when saving FormBean are following:

- In Request Scope, values of FormBean are available to current request but in Session Scope, values of FormBean are available throughout the session.

How to display validation errors on JSP page?

Validation error:
Validation error are those error which arises when user or client enters the invalid format data into the form. For this validation of data struts enables the programmer with the Validator() method which validates both the data from client side and the server side.

We can display all error in the JSP page by using the following syntax in the code.

Syntax:
<html:error/>

How to use forward action to restrict a strut application to MVC?

We can use the ForwarAction to restrict the Struts application to Model View Controller by following coding:
<global-forwards>
<statements>
<forward name="CitizenDetailsPage"
path="/gotoCitizenDetails.do" />
</global-forwards>

<action-mappings>
<statements>
<action path=”/gotoCitizenDetails”
parameter=”/CitizenDetails.jsp”
type=”org.apache.struts.actions.ForwardAction” />
</action-mappings>

What is ActionMapping?

In action mapping is the mapping of the action performed by the user or client on the application.

- We specify the action class for a specific user’s action. Like we provide the path or URL and different view based on user event.
- We can also define where control of the page deviate in case of validation error in the form.
- We can include ActionMapping in code like this:
<action-mappings>
<action path="/a" type=myclasse.A name="myForm">
<forward name="Login" path="/login.jsp"/>
<forward name="error" path="/error.jsp"/>
</action-mappings>

What is role of Action Class?

- An Action class in the struts application is used to handle the request.

- It acts as interface or communication medium between the HTTP request coming to it and business logic used to develop the application.

- Action class consists of RequestProcessor which act as controller. This controller will choose the best action for each incoming request, generate the instance of that action and execute that action.

- This should be in thread-safe manner, because RequestProcessor uses the same instance for no. of requests at same time.

How to combine the Struts with Velocity Template?

We can combine Struts and Velocity template by performing following steps:

1. Set classpath to Velocity JARs.
2. Make web.xml file to identify the Velocity servlet.
3. Select Velocity toolbox.xml in WEB-INF directory.
4. Modify struts-config to point its views to Velocity templates instead of JSPs.
5. Create a Velocity template for each page you want to render.

In how many ways duplicate form submission can occurs?

The submission form can be duplicated by the any of the following ways:

- Using refresh button.
- By clicking submit button more than once before the server sent back the response.
- By clicking back navigation button present in browser.
- The browser is restores to submit the form again.
- By clicking multiple times on a transaction that is delayed than usual.

What is the difference between Struts 1 and struts2?

The difference between struts1 and struts2 are below:

- Struts1 uses ActionServlet as Controller where as Struts2 uses Filter as a controller.

- Struts1 uses the ActionForm for mapping the JSP forms but in struts2 there no such ActionForm.

- Struts1 uses Validation() method to validate the data in the page forms where as struts 2 validation of data is ensure by Validator Framework.

- In Struts 1 the bean and logic tag libraries are often replaced by JSTL, but Struts 2 has such tag libraries that we don’t need to use JSTL.

What are the steps used to setup dispatch action?

To setup the dispatch action the following steps are used:

- Create a subclass for DispatchAction.
- Create method for logical action and their related actions.
- Request Parameter is created for each action.
- Define ActionMapping.
- The JSP takes on the subclass defined for dispatch action method names as their values.

What is difference between Interceptors and Filters?

The difference between Interceptors and filter are below:

- Filters are based on Servlet Specification whereas Interceptors are based on Struts2.
- Filters are executed only when patter matches whereas Interceptors executes for all request qualifies for a front controller.
- Filters are not Configurable method calls whereas Interceptors methods can be configured.

What are the Custom tags?

Custom Tags are User Defined Tags, which means that user can create those tags depending upon their need in the application.

- When a JSP page consisting of user- defined or custom tag is translated into a Servlet, the custom is also get translated into operation.
- Help in fast development of the application due to custom tag reusability.

What is the difference between empty default namespace and root namespace?

The difference between the empty default namespace and root name space are:

- When namespace attribute is not defined then it is referred to as Empty Default Namespace whereas when name space attribute is assign with forward slash(/) then it is referred to as Root Name Space.

- The root namespace must be matched.

What is the difference between RequestAware and ServletRequestAware interface?

The difference between RequestAware and ServletRequestAware are:

- RequestAware enables programmer with the attributes in the Servlet Request as a map whereas ServletRequestAware enables programmer with HttpServletRequest object.

- ServletRequestAware are more flexible than RequestAware.

- ServletRequestAware makes action class highly coupled with Servlet environment which is not possible in RequestAware.

What are inner class and anonymous class?

Inner class: classes that are defined within other classes.

- The nesting is a relationship performed between two different classes.
- An inner class can access private members and data.
- Inner classes have clearly two benefits:
1. Name control
2. Access control.

Anonymous class: Anonymous class is a class defined inside a method without a name.
- It is instantiated and declared in the same method.
- It does not have explicit constructors.

What is struts.devMode?

The struts.devMode is used to make sure that framework is running in development mode or production mode by setting true or false. struts.devMode is set to false in production phase to reduce impact of performance. By default it is "false". It is used because of the following reasons:

Resource Reloading: Resource bundle reload on every request
Modification: struts.xml can be modified without restarting or redeploying the application
Error Handling: The error occurs in the application will be reported, as oppose to production mode.

What are action errors?

Action error: when user or client submits the incorrect or invalid data in the application, then these errors are known as Action error.

- Action errors are generated by the clients.
- Action error should be determined as soon as possible.

The impacts of such Action Error are:

- Wastage of server time and resources.
- Negative impact on code quality.

What is request processor and how does it relates to action mapping?

The Request Processor in java is responsible for the following in its process method (). There are steps that are required to be processed by using the Request Processor that retrieves appropriate XML block for the URL from struts-config.xml.

1. XML block looked for by the request processor is called Action Mapping. A class called Action Mapping in org.apache.struts.action package is also involved which is responsible for holding mapping between URL and action.
<action path="/submit Form"
type="City.example. Citizen Action"
name="Citizen Form"
scope="request"
validate="true"
input="Citizen Form.jsp">
<forward name="success"
path="ThankYou.jsp"
redirect=”true”/>
<forward name="failure" path="Failure.jsp" />
</action>

2. The Request Processor is responsible for looking up the configuration file for the URL pattern "/submits Form". (i.e. URL path without the suffix do) and finds the XML block shown in the example above. The type attribute tells Struts which Action class has to be instantiated. The XML block also contains several other attributes. Together these constitute the Java Beans properties of the Action Mapping instance for the path /submit Detail Form. The above XML block tells Struts to map the URL request with the path "/submit Form" to the class "mycity.example.Citizen Action".

What are the differences between HTTP direct and HTTP indirect?

The difference between HTTP Forward and HTTP Redirect can be stated as follows:

HTTP Forward :
HTTP Forward is the process used for displaying a page when requested by the end user. The user requests for a resource by clicking on a hyperlink or submitting a form and the next page is displayed to the user as a response. Under Servlet container, HTTP Forward is done by invoking the following command:
RequestDispatcher dispatcher = httpServletRequest.getRequestDispatcher(url);
Dispatcher.forward(httpServletRequest, httpServletResponse);

HTTP Redirect
HTTP Redirect is more complex as compared to HTTP direct. In this a user requests a resource and the responses are first sent to the user, which is not the requested resource.
It is a response with HTTP code “302” and contains the URL of the requested resource. This URL can be same or different from original requested URL. The client browser sends the request for the resource again with the new URL, this time, the requested resource is sent to the user. In web tier HTTP redirect can be done by using the simple API, sendRedirect() on the HttpServletResponse instance.

What are action errors and error and what are the consequences they impose?

Users of web application may submit incorrect data or no data at all. These errors have to be caught as close to the user interface as possible, instead of waiting for the middle tier or the database to tell column cannot be inserted in the database due to expecting a non-null value.

Following are the consequences of such programming practice:

1. Wastage of server time and resources. As the request, this consumes the time and resources fails.
2. Negative impact on code quality as the probability of entering null data has to be checked while using or coding for business logics as they are the toughest codes of the system and contain enough blocks for if-else.

What are the sections into which a strut configuration file can be divided?

Strut configuration file directly relates to struts-config. The five sections into which strut configuration file is divided are:

1. Form bean definition section: This is the section that is required to provide the definition of the form bean that is used to create the form and allow the user to communicate with the server using it.

2. Global forward definition section: it allows the components to be forwarded as global and provide the server with the information about the global variables.

3. Action mapping definition section: this allows the mapping of various actions that can be used to provide the tool for the user to their help.

4. Controller configuration section: this allows the configuration settings to be controlled and filled by the user. The modifications can be done to change the settings that are to be used for controlling the resources.

5. Application Resources definition section: this allows the resources to be defined that are used in the application.

List the important attribute and elements of action mapping under struts.

The important attribute and elements of action mapping under struts are as follows :

1. Path : It is the URL path for which the action mapping is used. The path must be unique and can be for either path mapping or suffix mapping.

2. Type : It is the fully qualified class name of the Action.

3. Name : It is the logical name of the Form bean. It helps in deciding which action mappings should use which ActionForms for strut application.

4. Scope : The Scope of the Form bean is either session or request.

5. Validate : Is either true or false. For true, the Form bean is validated on submission, for false, the validation is skipped.

6. Input : When validation error exists the physical page to which the control should be passed is called the input.

7. Forward : When action forward with respect to the name is selected in execute method of action class the control is passed to this page.

Give an example of validates method used to avoid errors.

Struts uses validate() method in the ActionForm to handle user input validations for cases of incorrect or no input.

An example for validate method is given below.
Listing 2.2 validate() method in the CityForm
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request)
{
    // Perform validator framework validations
    ActionErrors errors = super.validate(mapping, request);
    // Only need crossfield validations here
    if (parent == null)
    {
        errors.add(GLOBAL_ERROR,
        new ActionError("error.custform"));
    }
    if (firstName == null)
    {
        errors.add("firstName",
        new ActionError("error.firstName.null"));
    }
    return errors;
}

What is a custom tag?

Custom Tags can be described as Java classes written by developers which can be used in the JSP using XML markup. Custom tags can be considered as class which acts as view helper beans that can be put into use without scriptlets which are Java code snippets mixed with JSP markup. JSP pages are developed and tweaked by page authors and cannot interpret the scriptlets. This blurs the separation of different duties to be performed in a project. Custom Tags thus help in solving this problem as they are XML based and like any markup language and can be easily understood by page authors.
<html>
<head>
<html:base/>
</head>
<body>
<html:form action="/submitForm">
<html:text property="firstName" />
<html:text property="lastName" />
<html:submit>Continue
</html:form>
</body>
</html>

What is the procedure of operation of a form tag?

The FormTag might comprise other tags in its body. Like a submit tag whose example is given below the form tag operates as follows:
<input name=”firstName” type=”text” value=”” />

The servlet container passes the JSP to display the HTML.

<html>
<head>
<html:base/>
</head>
<body>
<form name=”CityForm” action=”/submitForm.do”>
<input type=”text” name=”firstName” value=”” />
<input type=”text” name=”lastName” value=”” />
<input type=”submit” name=”Submit” value=”” />
</form>
</body>
</html>

On encountering a form tag a container activates the doStartTag() method which performs the same function as of the Request Processor in the execute() method.

1. The Form Tag in its path attributes checks for an Action Mapping with /submitForm.

2. On finding the action mapping the search for city form is generated under request for session scope.

3. Failing to find the one the form tag creates and puts a new value for the one in the related context. If the value is found it is used which makes form name available.

4. The action tag is accessed by form field tags from page context to retrieve the values from action form attributes in accordance to names.

What are the reasons for an error message not being displayed while developing struts application?

This is a very common problem that occurs very often while developing strut application. The error message is not displayed when it should be and thus can be detected. For example when a login details page is left blank and login is pressed an error should be displayed but sometimes it doesn’t. The reason for such problem of error messages not being displayed can be:

1. When the system fails to locate the properties file or the key then this problem might occur. This can be resolved by setting the message :
<message-resources null="false"...> for debugging.

2. Another reason for this problem is due to the wrong positioning of the tag. For example if the tag is not placed in <td> and is instead placed in <tr> the client browser will be unable to display the error messages even if the tag worked properly.

How to work with error tags?

Working with error tags is not as complex as it looks. Error tags can be put in place by adding <html:errors/> in to JSP. Unlike others the error tag does not have a body it also does not consist of any attributes. The only function the error tag performs is to display the error in place where the error tag is placed using three features - the header, the body and the footer. The list of the error text to be displayed or written is represented by the error body.

What are the steps involved in creating a strut application?

Following is a step by step procedure to create a strut application:

1. Relevant entries are added into web xml.

2. Then the procedure is begun with a blank template to which the following are adder: Declaration for request process and message resource bundle , properties file and its declaration as message resource bundle, the declaring of form bean, action mapping for the same and forwards.

3. After the above step the class which represents the form bean is created.

4. Next the action class is created.

5. Follows the creation of JSP using strut tags.

6. Each < bean: message> tag consisted in JSP is given a value of key pairs to the message resource bundle which was created in step 2.

7. Form bean is given a validation.

8. Error messages are defined within the message resource bundle.

9. Finally creation of the remaining JSP’s takes place.

How can link tag’s action attribute be used?

There are various ways in which Link tag can be used with the help of conjunction with forward action because link tag itself has several variations. Another way of using link tag can be out forward as declaring of Page 1 hyperlink that navigates to Page 2 by using the following method :
<html:link action=”gotoPage2”>Go to Page 2</html:link>

After this link the action mapping of /gotopage 2 by struts configuration file :
<action path=”/gotoPage2”
parameter=”/Page2.jsp”
type=”org.apache.struts.actions.ForwardAction” />

State the procedure for using forward attribute of link tag’s.

Another way to use <html:link> is known as forward attribute. This approach makes use of forward attribute of the link tag rather than action. The steps involve din this approach are as follows:

First step consist of declaring of Page1 hyperlink that lands to Page2 by setting
<html:link forward=”page2Forward”>Go to Page 2</html:link>

now the addition of Global Forward for “page2Forward” in the globalforwards section is done as follows:
<global-forwards>
<forward name=”page2Forward” path=”/Page2.jsp” />
</global-forwards>

By using the following manner <html:link> is transformed into following HTML Link.
<a href=”App1/Page2.jsp”>Go to Page 2</a>

After this the JSP name is hidden and the action mapping is defined.
<action path=”/gotoPage2”
parameter=”/Page2.jsp”
type=”org.apache.struts.actions.ForwardAction” />

After this the global forward is modified to point towards the action mapping
<global-forwards>
<forward name=”page2Forward” path=”/gotoPage2.do” />
</global-forwards>

Using in this manner the <html:link> is transformed into HTML Link.
<a href=”App1/gotoPage2.do”>Go to Page 2</a>

How is forward action used for integration?

The responsibility of the forward action is to specify the resource which has to be forwarded. The resource to be forwarded can be a physical page or a URL patern being handled by any other controller which might be external to struts. This can be explained with the following example :
<action path=”/gotoPage2”
parameter=”/xoom/App2”
type=”org.apache.struts.actions.ForwardAction” />

In above example the resource value is not a physical page instead is a logical value which can possibly be mapped to an external servlet. But when noticed from the perspective of page 1 it is a struts URL. Thus in the following way the integration is done by forward action.

How can forward action be used to restrict a strut application to MVC?

This can be imply done by adding the following ForwardAction and Global Forward to the Struts Config file.
<global-forwards>
..
<forward name="CitizenDetailsPage"
path="/gotoCitizenDetails.do" />
</global-forwards>

<action-mappings>
..
<action path=”/gotoCitizenDetails”
parameter=”/CitizenDetails.jsp”
type=”org.apache.struts.actions.ForwardAction” />
</action-mappings>

Give an alternative way to protect JSP’s with not much features from direct access.

The restriction of access to JSP’s which are not supported by many features can be implemented by adding the following entries to the web xml.
<security-constraint>
<web-resource-collection>
<web-resource-name>Deny Direct Access</web-resource-name>
<description>
Deny direct access to JSPs by associating
them with denied role
</description>
<url-pattern>*.jsp</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>Denied</role-name>
</auth-constraint>
</security-constraint>
<security-role>
<role-name>Denied</role-name>
</security-role>

What are the steps used to setup dispatch action?

To setup the dispatch action the following steps are used:

1. A subclass for DispatchAction is created.
2. A method is created for for every logical action after identifying the related actions.
3. For all actions a request parameter is identified.
4 An action mapping is defined for the subclass created for the dispatch action to which the identified request parameter is assigned as parameter attribute value.
5. The JSP which identified request parameter in step 3 takes on the subclass defined for dispatch action method names as there values.

How is a lookup dispatch action created?

A lookup dispatch action can be created in following steps:

1. A subclass for LookupDispatchAction is created.
2. A method is created for every logical action after identifying the related actions.
3. For all actions a request parameter is identified.
4. An action mapping is defined in struts config xml. After which the request parameter identified previously is assigned as the value for parameter attribute of the action mapping.
5. Getkeymethodmao() is implemented in the subclass created for lookupdispatchAction which returns java.util.Map. The keys in the map are used as keys for message resource bundle.
6. After this a button is created for the names in JSP by using <bean:message>.

State an example of struts configuration file as an action parameter for action servlet.

There is generally one file used as configuration file in struts named strutconfig. This file is specified in web xml for initializing the action servlet in the following way :
<servlet>
<servlet-name>mycity</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
</servlet>

What are the ways in which duplicate form submission can occur?

The submission form can be duplicated by the following ways:

1. Pressing the refresh button.
2. The browser back button can be used for traversing back to submit form page and resubmit form.
3. The history of browser can be accessed to submit the form again.
4. Heavy impact on server for personal gain can be inflicted by malicious submission of form.
5. By clicking multiple times on a transaction that is delayed than usual.
What is Jakarta Struts Framework?
Jakarta Struts Framework - An open source framework for creating web applications. Web applications, some deliver static content and some create dynamic response.....
Components of Struts
Components of Struts - Model Components, View Components, Controller Components.....
Core classes of the Struts Framework
Core classes of the Struts Framework - The core classes of Struts framework are: ActionServlet, ActionForm, Action, Action Mapping, ActionForward.....
Post your comment
Discussion Board
Great Explanation..
Very useful..
Vijay 08-29-2015
Struts
Thank you sir .This question useful for my interview.
S.Poongodi 08-18-2015
thank u
Your explanation is good.thank u so much.
harikanth 05-9-2014
Struts.
Thank you.:)

Its very useful for the interview and understanding the basic functionality of the struts.
pankaj kumar 04-25-2014
Struts
Thanks a lot sir. You thought other to develop where as other thought for their self devolopment
Manoj kumar Khanda 09-12-2013
Struts
Hi sir its really uses of interview point and normal learn on struts

Thanks sir
M R Siva
E-mail:sivasoft.java@gmail.com
siva 05-24-2013
Reg:Java/Struts 82 Q&A
It is really useful for facing interview,I got bit confident before my interview round..
sravan kumar.s 03-24-2013
Struts
thanks you very much sir...........
venkatakrishna 02-21-2013