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

Is jsp and javascript same?

495


Explain jsp action elements or action tags?

487


How do I run a jsp file?

515


What are the different life-cycle methods?

536


What is contextpath?

499






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

492


What do you mean by jsp?

508


how can i add properties in dynamic text fields using .js file?

1742


How do we catch exception and process it using jstl?

508


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

446


Is jsp server side scripting language?

579


What are the implicit objects in jsp?

514


What are custom tags in jsp?

555


How do we configure init params for jsp?

516


Explain jsp:plugin action?

534