×

Top 15 Struts Interview Questions for 2024

1) What are the Features of Struts 2?

Features of Struts 2 are:
  • Configurable MVC components
  • POJO based actions
  • AJAX support
  • Integration support
  • Various Result Types
  • Various Tag support
  • Theme and Template support

2) What are the default interceptors of Struts 2?

Default interceptors of Struts 2 are:
alias clearSession store annotationWorkflow staticParams
autowiring externalRef i18n sessionAutowiring timer
chain execAndWait debugging servletConfig token
checkbox exception multiselect scope roles
cookie fileUpload workflow modelDriven params
conversionError jsonValidation validation scopedModelDriven prepare
createSession logger tokenSession actionMappingParams profiling

3) What are the methods of ValueStack interface in Struts 2?

Methods of ValueStack interface are:
  • public String findString(String expr)
  • public Object findValue(String expr)
  • public Object findValue(String expr, Class c)
  • public Object peek()
  • public Object pop()
  • public void push(Object o)
  • public void set(String key, Object value)
  • public int size()

4) What are the methods of ActionInvocation interface in Struts 2?

Methods of ActionInvocation interface are:
  • public ActionContext getInvocationContext()
  • public ActionProxy getProxy()
  • public ValueStack getStack()
  • public Action getAction()
  • public void invoke()
  • public Result getResult()

5) What are the Constants of Action Interface in Struts 2?

The Constants of Action Interface are:
  • SUCCESS
  • ERROR
  • LOGIN
  • INPUT
  • NONE

6) What are the types of Bundled validators in Struts 2?

Types of bundled validators are:
  • requiredstring validator
  • stringlength validator
  • email validator
  • date validator
  • int validator
  • double validator
  • url validator
  • regex validator

7) What are different ways to create Action classes in Struts2?

There are Three ways to create Action class are:
  • We can create Action class by implementing Action interface
  • We can create Action class using Struts2 @Action annotation
  • We can create Action class by extending ActionSupport class

8) Name some useful annotations introduced in Struts2?

Useful annotations introduced in Struts2 are:
  • @Action
  • @Actions
  • @Namespace and @Namespaces
  • @Result
  • @ResultPath

9) What are the life cycle methods of interceptor?

Life cycle methods of interceptor are:
  • public void init()
  • public void destroy()
  • public void intercept(ActionInvocation ai)

10) What are the Aware interfaces in Struts2?

There are four Aware interfaces in Struts2 are:
  • SessionAware
  • ServletContextAware
  • ServletRequestAware
  • ServletResponseAware

11) What is OGNL?

It is an Expression language, It provides the accessibility feature for data stored in the ActionContext and stands for Object Graph Navigation Language.

12) What is the use of jsonValidation?

It is an interceptor which is used to perform asynchronous validation and it works with workflow and validation interceptors.

13) What is ActionInvocation?

It is responsible to invoke action and it holds the action and interceptor objects.

14) How to create input page(index.jsp) in Struts2 application?

Example of input page:
<%@ taglib uri="/struts-tags" prefix="s" %>    
<s:form action="book">    
<s:textfield name="id" label=" Id"></s:textfield>    
<s:textfield name="name" label="Book Name"></s:textfield>    
<s:textfield name="price" label="Book Price"></s:textfield>    
<s:submit value="save"></s:submit>    
</s:form>

15) What are the parameters of stringlength validator?

Parameters of stringlength validator are:
  • trim
  • minLength
  • maxLength
  • fieldName

Related Topics

Top 15 NodeJS Interview Questions for 2024

1) What is NodeJs? NodeJs is open source JavaScript based feamework used to develop I/O intensive web application. It is collections of JavaScript library and runtime environment. It is used to...

3 minutes read.

Top 40 IoT Interview Questions and Answers in 2024

Q.1 What is IoT? IoT stands for the Internet of things refers to the interconnection of the network of various devices that can recognize, collect and transfer data over the internet...

13 minutes read.

Top 30 D Programming Language Interview Questions for 2024

1) What is D programming language? D programming language is an object oriented programming language. It is created by Walter Bright of Digital Mars. It was released in 2001. 2) Who is the...

4 minutes read.

Top 30 AJAX Interview Questions for 2024

1) What is AJAX? AJAX (Asynchronous JavaScript and XML) create better, faster and interactive web-apps. It provides data transfer between web-server and browser. 2) List some advantages of AJAX Advantages are: More Interactive: Very...

3 minutes read.

Top 26 CouchDB interview questions for 2024

1) What is CouchDB? CouchDB is a document typed database server which can be accessed through RESTful JSON API. It is a schema free and Ad-hoc database with a flat address...

4 minutes read.

Top 10 GWT Interview Questions for 2024

1) What is Google Web Toolkit (GWT)? GWT (Google Web Toolkit) is a development toolkit. It is used to develop Ajax web applications using Java. GWT compiler translates Java sour ce...

2 minutes read.

Top 40 TensorFlow Interview Questions and Answers

Commonly Asked TensorFlow Interview Questions for Fresher Q1. What is TensorFlow? TensorFlow is the machine learning library developed by Google's brain team, it supports multiple abstraction levels, and we can choose the...

13 minutes read.

Top 31 Koa Interview Questions for 2024

1) What is Koa? Koa is a very small framework which provides us a minimal interface to build our applications. It is quite flexible and there are numerous modules available on...

4 minutes read.

Top 15 ExpressJS Interview Questions for 2024

1) What is ExpressJs? Express Js is a framework for node.js which is light-weight and fast. It is used to develop web and mobile applications. 2) What are the features of ExpressJs? Following...

4 minutes read.

Top 15 XML Interview Questions for 2024

1) What is XML? XML (eXtensible Markup Language) is designed to transport and store data. It has user executive tags i.e. no pre-defined tags used as in HTML. This language is...

2 minutes read.

Top 30 SQLite Interview Question for 2024

1) What is SQLite? It is an in-process library which implements self-contained, serverless, zero-configuration, transactional SQL database. 2) What datatype does SQLite supports? It uses dynamic typing and data can be stored in...

5 minutes read.

Top 22 DOJO Interview Questions for 2024

1) What is DOJO? DOJO is an open source JavaScript framework designed for very fast development of JavaScript/AJAX based application and websites having cross platform interdependencies. 2) Enlist all features of DOJO. ...

4 minutes read.

Flutter Interview Questions

Here’s a list of top Flutter questions that are frequently asked. Q1.  Is Flutter an open-source? A1.  Yes, Flutter is a 100% open-source software development kit. Q2.  What are flutter widgets? A2.  Widgets are...

7 minutes read.

Top 14 Materialize CSS Framework Interview Questions for 2024

1) What is Materialize? Materialize is a CSS framework that contains library file. It is created with CSS, JavaScript and HTML. It helps to create attractive, reliable and functional web pages...

7 minutes read.

Top 30 SQL Interview Questions for 2024

1. What is SQL? Ans. SQL stands for Structured Query Language.  It is a standard computer language for accessing, storing, and manipulating data stored in the relational database. SQL become an International Standard Organization (ISO)...

11 minutes read.

Top 30 VB Script Interview Questions for 2024

1) What is VB Script? VBScript stands for Visual Basic Scripting Language. It is a light version of Microsoft Visual Basic. It is a client side scripting Language. 2) What is the...

5 minutes read.

Top 15 KnockoutJS Interview Questions for 2024

1) What is KnockoutJS? It is a JavaScript library which is based on MVVM pattern that helps developers in building rich and responsive websites. 2) Who is the author of KnockoutJS? Steve Sanderson is...

2 minutes read.

Top 16 Arduino Interview Questions for 2024

1) What is Arduino? Arduino is an open source electronic platform. It is based on easy-to-use hardware and software. It able to read input signal. It is used to write and...

2 minutes read.

Backbone.js Interview Questions

1) What is Backbone.js? Backbone.js is a JavaScript framework or library. It is a client-side framework which helps in creating single page application in organized manner i.e. structured layout. 2) Backbone.js is...

4 minutes read.

Top 15 ES6 Interview Questions for 2024

Commonly Asked ES6 Interview Questions and Answers 1) What is ES6? ES6 is a scripting language specification standardized. It is used to enable client-side scripting. The specification is influenced by programming languages (Self, Python, Perl,...

2 minutes read.