Apache Struts Interview Questions and Answers

Struts Questions and Answers:

1 :: How the exceptions are handled in struts?

Exceptions in Struts are handled in two ways:

► Programmatic exception handling :
Explicit try/catch blocks in any code that can throw exception. It works well when custom value (i.e., of variable) needed when error occurs.

► Declarative exception handling :You can either define <global-exceptions> handling tags in your struts-config.xml or define the exception handling tags within <action></action> tag. It works well when custom page needed when error occurs. This approach applies only to exceptions thrown by Actions.

<global-exceptions>
<exception key="some.key"
type="java.lang.NullPointerException"
path="/WEB-INF/errors/null.jsp"/>
</global-exceptions>

or

<exception key="some.key"
type="package.SomeException"
path="/WEB-INF/somepage.jsp"/>
0/5 Rating (0 vote)
Is This Answer Correct?    1 Yes 0 No
Place Your Answer

2 :: What are the various Struts tag libraries?

The various Struts tag libraries are:

► HTML Tags
► Bean Tags
► Logic Tags
► Template Tags
► Nested Tags
► Tiles Tags
3/5 Rating (1 vote)
Is This Answer Correct?    2 Yes 0 No
Place Your Answer

3 :: How to display validation errors on jsp page?

<html:errors/> tag displays all the errors. <html:errors/> iterates over ActionErrors request attribute.
5/5 Rating (1 vote)
Is This Answer Correct?    2 Yes 0 No
Place Your Answer

4 :: What is DynaActionForm?

A specialized subclass of ActionForm that allows the creation of form beans with dynamic sets of properties (configured in configuration file), without requiring the developer to create a Java class for each type of form bean.
1/5 Rating (1 vote)
Is This Answer Correct?    1 Yes 0 No
Place Your Answer

5 :: What is SwitchAction?

The SwitchAction class provides a means to switch from a resource in one module to another resource in a different module. SwitchAction is useful only if you have multiple modules in your Struts application. The SwitchAction class can be used as is, without extending.
3/5 Rating (1 vote)
Is This Answer Correct?    1 Yes 0 No
Place Your Answer

Rate This Category:
0/5 Rating (0 vote)
Place Your Question



Top: Apache Struts Interview Questions and Answers
Apache Struts Interview Questions and Answers

Top Frequently Asked Struts Question
Frequently Asked Struts Job Interview Question


Top Frequently opened Java Programing Job Interview categories
Most popular Java Programing Job Interview categories

Comments About Apache Struts Interview Questions and Answers

Share your valuable opinions, ideas and suggestions about Apache Struts Interview Questions and Answers
While placing your comment your email address is required but won't be published any where else; Personal information will be kept confidential; we do not sell or release our respective visitors private information.
  1. Webmaster 20th of May 2012

    Webmaster Said

    Tell us what you feel about Apache Struts Interview Questions and Answers
    All comments will be published after review. No login or registration is required to post a comment on Apache Struts Interview Questions and Answers We offer and invite you to submit your valuable comment now; Please be respectful of others when commenting. Insulting others, self-promotional comments, website promotional comments, marketing stuff, SEO Techniques, SMS-style content and off-topic comments will not be approved at this information portal.
    So start sharing your thoughts regarding Apache Struts Interview Questions and Answers
    Thank you.

Leave a Comment

Leave a Comment
  1.  Enter This Verification Code  Regenerate Verification Code  



Your reply will be added to the comment above (Below any other replies to this comment) -

Top Comments About: Apache Struts Interview Questions and Answers
Comments on Apache Struts Interview Questions and Answers

 
Top of Link batk to Apache Struts Interview Questions and Answers
Link batk to Apache Struts Interview Questions and Answers