Let's learn java programming language with easy steps

Sunday, 8 April 2018

Struts Framework Interview Questions and Answers

Struts Interview Questions

Java Struts Interview Questions

 

Here we are going to see some important struts framework interview questions and answers which is mostly asked in advanced java or j2ee interviews.

Let's see one-by-one java struts interview questions and answers.


(1) What is Struts?

Struts is a framework which is used to create java based web application by using MVC design pattern.

Struts framework is an open source framework and extends servlet API.


(2) Which packages Struts framework use?

Struts framework use some package for developing web application e.g Java Servlets, Java Beans, XML, ResourceBundle, Jakarta packages.


(3) What is MVC?

MVC(Model View Controller) is a design pattern by using this we can design and develop the web application. 

Model represents the data and business logic. 

View used for presentation of the model.

Controller It takes the input from the user and acts as an interface between model and view. 


(4) What are the components of Struts?

There are 3 main components of the struts framework which is used to develop web applications and these are given below.

Model(java file) for containing state and business logic.

View(html, jsp, etc file) for presentation. 

Controller(Servlet or Filter) for handling request from the users.


(5) What is an Interceptor in Struts?

Interceptor is an object which provides the preprocessing and postprocessing logic before and after the action is called.


(6) What is a Configuration file in Struts?

Configuration file is a file in struts where we define action class component and view components and Interceptor also.


(7) What is struts.xml?

Struts framework provide struts.xml file which is called configuration file for mapping of an action class component and view components.


(8) What is multi-configuration in Struts?

In Struts, multi-configuration means we can use more than one .xml file for mapping e.g first.xml and second.xml, struts.xml but we have to define first.xml and second.xml in struts.xml configuration file.


(9) What is Value Stack?

Value stack contains application objects like action and other model objects.


(10) What is ActionInvocation?

It holds the action and interceptor and invokes the action.


(11) Can we create own interceptors in Struts?

Yes, We can create own interceptors in struts framework.


(12) How to create own or custom interceptors in Struts?

We can create own or custom interceptor in java struts framework by implementing Interceptor interface.

(13) What is POJO? 

POJO(Plain Old Java Object) class is simple a action class(java class).

(14) What is the role of Action class? 

An action class act as an adapter between the contents of an incoming request and the corresponding business logic that should be executed to process this request.


(15) What is ActionSupport?

In struts, ActionSupport is a class which implements Action, Validateable, Serializable etc interfaces and overrides execute() method of Action interface.


(16) What is Action?

Action is an interface with execute() method and 5 constants which is given below.

public static final String SUCCESS = "success"
public static final String ERROR = "error"
public static final String LOGIN = "login"
public static final String INPUT = "input"
public static final String NONE = "none"


(17) Why use execute() method?

In Struts , execute() method is used for business logic in action class.


(18) What is Zero Configuration?

Zero configuration means there is no need of configuration files like struts.xml etc. It is possible by using annotation or naming convention.


(19) What are the classes used as part of Struts framework?

There are some classes used in struts e.g Action Servlet, Action Class, Action Form, Action Mapping, Action Forward.


(20) What validate() and reset() method does?

Both methods are defined in the form bean. Validate method is used to validate the request parameter and reset method clear the action form data members.

Visit for more java interview Questions, link given below

Servlet Interview Questions.
JSP Interview Questions.
OOPS Interview Questions.
Top 10 Java Coding Interview Questions.

Here we discussed some most important Struts interview questions and answers in java. It will be useful to you. 


Share:

13 comments:

  1. Great post for java struts interview questions. Nice article.good job.

    ReplyDelete
  2. CIITN is the Best Php training institute in Noida and delhi Ncr. You will get Live Project Training on PHP by our PHP expert who have 5+ year industrial experience.Focus on practical and live project training. In our PHP training, we you will learn core PHP, advance PHP, HTML, CSS, JavaScript, jQuery, Bootstrap, Cake PHP and Wordpress.CIITN provides 100% job assistance in PHP training. CIITN is well known PHP coaching center because our 100% PHP students are placed now.


    Ciitnoida provides Core and java training institute in noida. We have a team of experienced Java professionals who help our students learn Java with the help of Live Base Projects. The object-oriented, class-based build of Java has made it one of most popular programming languages and the demand of professionals with certification in Advance Java training is at an all-time high not just in India but foreign countries too.

    By helping our students understand the fundamentals and Advance concepts of Java, we prepare them for a successful programming career. With over 13 years of sound experience, we have successfully trained hundreds of students in Noida and have been able to turn ourselves into an institute for best Java training in Noida.


    java training institute in noida
    php training in noida
    linux training in noida
    linux institute in noida
    java course in noida

    ReplyDelete
  3. Thanks for Sharing this Informative Information this is very Helpful for Beginners, I like this I Can Share this in My Friend Circle.
    Java Training in Noida

    ReplyDelete
  4. Keep up the good work. Your blog is very informative and helpful. Waiting for more posts.
    java training

    ReplyDelete
  5. The Java Programming Language A Detail Introduction in Bullet Points

    ReplyDelete

Facebook Page Likes

Follow javatutorial95 on Google+

Follow javatutorial95 on twitter

Popular Posts

Get Updates By Email

Link

Translate