The largest Interview Solution Library on the web


Interview Questions
« Previous | 0 | 1 | 2 | 3 | 4 | Next »

21.What happens when buffer is set to a value “none”?

When buffer is set to “none”, servlet output is immediately directed to the response output object.

22.What is autoFlush attribute?

The autoFlush attribute specifies whether buffered output should be flushed automatically when the buffer is filled, or whether an exception should be raised to indicate buffer overflow.
A value of true default indicates automatic buffer flushing and a value of false throws an exception.

23.What is contentType attribute?

The contentType attribute sets the character encoding for the JSP page and for the generated response page. The default content type is text/html, which is the standard content type for HTML pages.

24.What is errorPage attribute?

The errorPage attribute tells the JSP engine which page to display if there is an error while the current page runs. The value of the errorPage attribute is a relative URL.

25.What is isErrorPage attribute?

The isErrorPage attribute indicates that the current JSP can be used as the error page for another JSP.
The value of isErrorPage is either true or false. The default value of the isErrorPage attribute is false.

26.What is extends attribute?

The extends attribute specifies a superclass that the generated servlet must extend.

27.What is import attribute?

The import attribute serves the same function as, and behaves like, the Java import statement. The value for the import option is the name of the package you want to import.

28.What is info attribute?

The info attribute lets you provide a description of the JSP.

29.What is isThreadSafe attribute?

The isThreadSafe option marks a page as being thread-safe. By default, all JSPs are considered thread-safe. If you set the isThreadSafe option to false, the JSP engine makes sure that only one thread at a time is executing your JSP.

30.What is language attribute?

The language attribute indicates the programming language used in scripting the JSP page.

31.What is session attribute?

The is session attribute indicates whether or not the JSP page uses HTTP sessions. A value of true means that the JSP page has access to a builtin session object and a value of false means that the JSP page cannot access the builtin session object.

32.What is isELIgnored Attribute?

The is ELIgnored option gives you the ability to disable the evaluation of Expression Language EL expressions.
The default value of the attribute is true, meaning that expressions, ${...}, are evaluated as dictated by the JSP specification. If the attribute is set to false, then expressions are not evaluated but rather treated as static text.

33.What is isScriptingEnabled Attribute?

The is ScriptingEnabled attribute determines if scripting elements are allowed for use.
The default value true enables scriptlets, expressions, and declarations. If the attribute's value is set to false, a translation-time error will be raised if the JSP uses any scriptlets, expressions non − EL, or declarations.

34.What is a include directive?

The include directive is used to includes a file during the translation phase. This directive tells the container to merge the content of other external files with the current JSP during the translation phase. You may code include directives anywhere in your JSP page. The general usage form of this directive is as follows:
<%@ include file="relative url" >

35.What is a taglib directive?

The taglib directive follows the following syntax:
<%@ taglib uri="uri" prefix="prefixOfTag">
uri attribute value resolves to a location the container understands prefix attribute informs a container what bits of markup are custom actions. The taglib directive follows the following syntax:
<%@ taglib uri="uri" prefix="prefixOfTag" >

36.What do the id and scope attribute mean in the action elements?

  • Id attribute: The id attribute uniquely identifies the Action element, and allows the action to be referenced inside the JSP page. If the Action creates an instance of an object the id value can be used to reference it through the implicit object PageContext
  • Scope attribute: This attribute identifies the lifecycle of the Action element. The id attribute and the scope attribute are directly related, as the scope attribute determines the lifespan of the object associated with the id. The scope attribute has four possible values: a page, b request, csession, and d application.

37.What is the function of <jsp:include> action?

This action lets you insert files into the page being generated. The syntax looks like this:
Where page is the the relative URL of the page to be included.
Flush is the boolean attribute the determines whether the included resource has its buffer flushed before it is included.

38.What is the difference between include action and include directive?

Unlike the include directive, which inserts the file at the time the JSP page is translated into a servlet, include action inserts the file at the time the page is requested.

39.What is ,jsp:useBean, action?

The useBean action is quite versatile. It first searches for an existing object utilizing the id and scope variables. If an object is not found, it then tries to create the specified object. The simplest way to load a bean is as follows:

40.What is ,jsp:setProperty, action?

The setProperty action sets the properties of a Bean. The Bean must have been previously defined before this action.

« Previous | 0 | 1 | 2 | 3 | 4 | Next »


copyright © 2014 - all rights riserved by javatechnologycenter.com