Ads 468x60px

Pages

Wednesday, 4 July 2012

struts interview questions


Ques: 58 How many types of tag libraries are available in the Struts framework?
Ans: Five types of tag libraries are available in the Struts framework:
  * HTML tag library.
  * Tiles tag library.
  * Logic tag library.
  * Template tag library.
  * Bean tag library.

Ques: 59 What is for <html:cancel/> tag in HTML tag library in the Struts framework?
Ans: The <html:cancel /> tag is used to render an HTML <input> element with an input type of cancel. 
The <html:cancel /> has a body type of JSP and support the 25 attributes:
accessKey, alt, altKey, disabled, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, property, style, styleClass, styleId, tabindex, title, titleKey, value.

Ques: 60 What is for <html:checkbox /> tag in HTML tag library in the Struts framework?
Ans: The <html:checkbox/> tag is used to render an HTML <input> element with an input type of checkbox. 
The <html:checkbox/> has a body type of JSP and supports 27 attribute:
indexed, name, accessKey, alt, altKey, disabled, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, property, style, styleClass, styleId, tabindex, title, titleKey, value.

Ques: 61 what is for <html:errors> tag in the HTML tag library? Define its attributes?
Ans:The <html:errors /> tag is used to display the ActionError objects stored in an ActionErrors collection. 
The <html:errors /> tag has a body type of JSP and support four attributes:
  * bundle : Specifies a MessageResources key of the resource bundle defined in the struts-config <message-resource> element.
  * locale : Specifies the session attribute containing the locale instance of the current. This locale is then used to select Locale-specific text messages.
  * name : Specifies the name of the request scope object that references the ActionErrors collection being displayed.
  * property : Specifies which error message should be displayed, based on each property contained in the ActionErrors collection.

Ques: 62 what is the use of <html:file/> tag? Name all the attributes of this tag?
Ans: The <html:file/> tag is used to create an HTML <file> element. This tag allows you to upload files that will be populated in named ActionForm's identified property. 
The <html:file/> tag has a body of JSP and supports 30 attributes:
indexed, name, accessKey, alt, altKey, disabled, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, property, style, styleClass, styleId, tabindex, title, titleKey, value, accept, maxlength, size.

Ques: 63 what is the use of <html:form/> tag? Name all the attributes of this tag?
Ans: The <html:form/> tag is used to create an HTML form. The form implicitly interacts with the named ActionForm bean to pre-populate the input fields values with the matching data members of the named bean. 
The <html:form/> tag has a body type of JSP and supports 13 attributes:
action, enctype, focus, focusIndex, method, onreset, onsubmit, scope, style, styleClass, styleId, target, type.

Ques: 64 What is for <html:html/> tag defined in the HTML tag library in struts framework?
Ans: The <html:html/> tag is used to render the top-level <html> element. 
The <html:html/> tag has a body type of JSP and supports two attributes:
  * locale : If set to true, then the Locale object named by the HTTP Accept-Language header is used to set the language preefrences.
  * xhtml : If set to true, causes an xml:lang attribute to be redered as an attribute of the generated <html> element.

Ques: 65 What is the difference between <html:image/> and <html:img/> tag in the HTML tag library in struts framework?
Ans: The <html:image/> tag is used to render an HTML <input> element with an input type of image. The image URL generated for this image is calculated using the value identified by the src or page attributes. You must specify one of the src or page attributes. 
The <html:image/> has a body type of JSP.
The <html:img/> tag is used to render an HTML <img> element. The image URL generated for this image is calculated using the value identified by the src or page attributes. You must specify one of the src or page attributes. The <html:img/> has no body.







0 comments:

Post a Comment