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

Which one is correct order of phases in jsp life cycle?

633


What do you know about writing custom jsp tags?

497


Is jsp technology extensible?

663


What is jsp syntax?

467


Which categories can be divided jstl tags, give examples.

521






What are the standard actions available in jsp?

545


What is jsp index?

497


What is scriptlet and what is expression?

523


What are the implicit, internal objects and methods on the jsp page?

454


What are the features of jsp?

503


Why is jsp used?

497


How can a thread safe JSP page be implemented?

573


What is scripting elements in jsp?

516


How can I set a cookie and delete a cookie from within a jsp page?

538


What is jsp and its architecture?

521