How many page directive we can use in a single JSP?

Answer Posted / rahul patil

We can have any number of page directive in a single jsp
page provided it should have only 'import' attribute.

e.g.
<%@ page import="beans.abc" buffer="2k"%> //1
.
.
.// some jsp page code
.
<%@ page import="beans.xyz"%> //2


if we replace line 2 with
<%@ page import="beans.xyz" buffer="4k"%> //not allowed

In short, we can use page directive many times but for
importing some other classes, not for setting other
attribute values.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many messaging models do jms provide for and what are they?

617


Explain jsp action elements or action tags?

581


What is jsp usebean?

575


Why is _jspservice () method starting with an '_'?

533


How can you include the results of another page?

561






List all tags that are provided in jstl?

587


What are advantages of jsp over asp, php, pure servlets and others?

562


What is difference between java and jsp?

566


How to send data from one page to another in jsp?

588


How many tags are provided in jstl?

672


How to include static files in a jsp?

590


What are the implicit objects in jsp?

589


Explain the advantages in jsp?

629


What is client scripting?

553


Mention the various implicit objects used in the expression

604