×

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 30 SASS Interview Questions for 2024

1) What is Sass? SASS: Systematically Awesome Style Sheets is an extension of CSS. It is also known as CSS pre-processor which helps to reduce repetition with CSS and saves time. It is...

4 minutes read.

Top 25 DB2 Interview question for 2024

1) Give breif detail about DB2? DB2 is a Relational Database Management System developed by IBM. It supports Object Oriented features and non-relational structures with XML. 2) Enlist the types of datatypes...

3 minutes read.

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 30 Zend Framework Interview Questions for 2024

1) What is Zend Framework? Zend is an open source, object-oriented web application framework. It is implemented in PHP 5. It was developed in 3 March 2006. 2) What is the use...

6 minutes read.

Top 10 Java Swing Interview Questions for 2024

1) What is Java Swing? It is a part of JFC (Java Foundation Classess) that is used to create window-based applications. Java Swing components are platform independent and lightweight . 2) What is...

3 minutes read.

Top 30 Python Interview Questions for 2024

1) What is Python? Python is a high level, interpreted and object-oriented programming language. It is easy to learn and supports multiple programming patterns. It is also known as powerful and versatile...

6 minutes read.

Django Interview Questions for 2024

Django is an open-source python web framework. It is very popular due to the functionalities it offers. It uses the Model-View-Template architecture. Many giant organizations are using Django as their...

10 minutes read.

Top 15 Foundation Interview Questions for 2024

1) What is Foundation? Foundation is a front-end framework that is for designing beautiful responsive websites. This framework is compatible with all types of devices and provides you with HTML, CSS...

2 minutes read.

VB.NET Interview Questions

1) What is VB.NET? VB.NET stands for Visual Basic .NET. It is an object oriented programming language. It is implemented on .NET framework and launched by Microsoft in 2001. 2) Who is...

3 minutes read.

Top 30 Drupal Interview Questions for 2024

1) What is Drupal? Drupal is an open source CMS (Content Management System) framework. It is written in php and provides rich set of tools to create web sites. 2) What are...

4 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 15 Haskell Interview Questions for 2024

1) What is Haskell? Haskell is a functional programming language. It is based on mathematical functions. This programming language is more intelligent than other popular programming languages. 2) Who is the developer of...

2 minutes read.

Top 10 WCF Interview Questions for 2024

  1. What is WCF? Windows Communication Foundation (WCF), earlier known by the name Indigo, is a run-time platform and a set of APIs in the .NET Framework for building, configuring, and...

7 minutes read.

Top 15 iOS (iPhone, iPad) Interview Questions for 2024

Top 20 Most Frequently asked iOS Interview Questions and Answers 1) What is iOS? iOS is a mobile operating system developed by Apple Inc. iOS offers iPhone and iPad application development using...

3 minutes read.

Top 31 CakePHP Interview Questions for 2024

1) What is CakePHP? CakePHP is an open-source PHP framework. It is used to develop dynamic web applications. It helps to developers to work in a structured manner. 2) When cakePHP was...

5 minutes read.

Top 15 ASP.NET MVC Framework Interview Questions for 2024

1) What is ASP.NET MVC Framework? ASP.NET MVC framework is a software architecture pattern for developing web applications. It is used to split the application's implementation logic into three components: models,...

4 minutes read.

SSRS Interview Questions

1. What is SSRS? The Microsoft SQL Server Reporting Service (SSRS) is a server-based reporting platform. It allows you to produce structured reports. The reports are generally represented in the form of data, graph,...

5 minutes read.

Top 28 LISP Interview Questions for 2024

1) What is LISP? LISP is the high-level programming language after Fortran. LISP is stands for List Processing. This programming language was invented by John McCarthy in 1958 at the Massachusetts Institute of...

3 minutes read.

Top 27 JavaScript Interview Questions for 2024

1) Define Undeclared and Undefined Variables? Undeclared variable are defined as these variable is neither defined nor exist in the program. If program calls this variable then it causes Runtime error. Undefined variable...

5 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.