Questions of Test: Struts interview questions 2

More >>

1

You have written an Action class named AccountAction that has two attributes "maxLimit" and "withdrawAmount". You are asked to configure struts validation to check withdrawAmount is less than maxLimit. 
 
Which of the following represents the correct configuration?

2

Which of the following is false about Struts 2?

3

Which of the following is true about the executeAndWait Interceptor?

4

Which of the following Interceptor is used for avoiding Double Form submissions in Struts 2?

5

You have 3 List objects in Action class attributes  
colorList ["Red", "Yellow", "Green"] 
codeList ["R", "Y", "G"] 
statusList ["Failed", "Severe", "Good"] 
 
What will be the output of the following code? 
 
<s:merge var="myMergedIterator"> 
     <s:param value="%{colorList}" /> 
     <s:param value="%{codeList}" /> 
     <s:param value="%{statusList}" /> 
</s:merge> 
<s:iterator value="%{#myMergedIterator}"> 
     <s:property /> 
</s:iterator>

6

What will be the output of the following: 
 
<s:generator val="%{'Java,JSP,J2EE,EJB,JMS'}" count="3"> 
<s:iterator> 
     <s:property /><br/> 
</s:iterator> 
</s:generator> 

7

Which of the following is the correct way to obtain the security Principal object in Struts 2?

8

If the returned result from ResourceAction Action class is "manage", then, you are asked to redirect to manageAction action under "admin" namespace. 
 
Which of the following configuration is correct?

9

You are asked to change the current feature of displaying the report result in HTML table to a downloadable Excel format with a default file name as "Y2008.xls". 
 
Which of the following is correct way to implement the same?

10

You are using Struts 2 tags with OGNL expression to access an attribute with the key "productId" in session. 
 
Which of the following is correct?

More >>