Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/purvgwtw/public_html/tutorials/common.php on line 7
Struts Interview Questions & Answers
Sponsered Links
Categories
Sponsered Links

Struts Interview Questions & Answers

What are Disadvantages of struts?

Struts have disadvantages on performance of the application. particularly when the using advanced tag like nested-loop etc.

Define Struts navigation flow?

Struts Navigation flow is as follows: A request is made from previously displayed view. The request reaches the ActionServlet which acts as the controller . The Action Class is performs its logic on the Model Components associated with the Application. Once The Action has been completed its processing it returns the control to the Action Servlet. The request is complete when the Action Servlet reacts by forwarding the request to the view, and this view represents the result of the action.

How we call EJB from Struts?

We call EJB from struts by using the service locator design model or by Using initial context with create a home object and getting return remote reference object.

What are token feature in Struts?

Use the Action Token methods are to prevent replicate submits There are methods built into the Struts action to generate one-use tokens. A token is placed in the session when a form is populated and also into the HTML form as a hidden property. When the form is returned, the token is validated. If validation is failed , then the form has already been submitted, and the user can be apprised.

Why we use the Struts framework in project?

There will be only one Servlet which behaves as a controller (MVC) pattern. If your web application is very a simple then there is no need to use struts. If the application is big like a any banking application etc, then you should use Struts as it is very robust, makes the things simple.

Define components of Struts?

Struts components are Model, View and Controller. Model: Components like business logic /business processes and data are the part of model. View: HTML, JSP are the view components. Controller: Action Servlet of Struts is part of a Controller components which works as front controller to handle all the requests.

Define important methods of ActionForm?

The important methods in a ActionForm are : 1: validate() & 2:reset().

Define ActionMapping?

A Action mapping holds all the deployment information in a particular Action bean. This class is to determine where the results of the Action will be sent once its processing is complete.

Differentiate between Struts 1.0 and Struts 1.1 ?

  • RequestProcessor class.
  • Method perform() replaced by the execute() in Struts base Action Class.
  • Changes to web.xml and struts-config.xml.
  • Declarative exception handling.
  • Dynamic ActionForms
  • Plug-ins.
  • Multiple Application Modules.
  • Nested Tags.
  • The Struts Validator
  • Removal of Admin actions.

etc.

Define Struts?

It is a java framework based on Model architecture of JSP or popularly called Model-View-Controller architecture. It’s provides a controller for this architecture.

What are the core classes of Struts?

These are : Action, ActionForm, ActionServlet, ActionMapping, ActionForward.

How is the data flow control by Struts ?

The Struts control implements the MVC/Layers pattern through the use of ActionForwards and ActionMappings to keep the control-flow decisions out of presentation layer.

Define ActionServlet?

The class org.apache.struts.action.ActionServlet is the called the ActionServlet.

How is Struts relates to J2EE?

Struts framework is a built on J2EE technologies (JSP, Servlet, Taglibs), but it is a itself not part of the J2EE standard.

Define the Struts actions?

It is an instance of a subclass of an Action class, which is implemented by a portion of a Web application and whose perform or execute method returns a forward.

What are the demerits of struts?

There are some disadvantages of the Struts: a) High Learning Curve b) Harder to learn

Define action mapping?

Struts provides a number of tag libraries that helps to create a view components easily. These tag libraries are:

  • Bean Tags
  • Logic Tags
  • HTML Tags
  • Nested Tags.

Sponsered Links
Latest Updates
 
All Content of this site is for learning only. We do not warrant the correctness of its content. The risk from using it lies entirely with the user. While using this site, you agree to have read and accepted our terms of use and privacy policy.
Copyright © 2014 PURVACOMPUTERS.COM All Right Reserved