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 do I view jsp files in my browser?

488


Tell us about the stages (phases) of the jsp life cycle.

475


How to disable scripting?

477


How many tags are provided in jstl?

561


How can I maintain session in JSP Page in the bases of user name and password:

555






How does a jsp engine work?

470


How can we handle the exceptions in jsp?

486


What is server side programming language?

483


Can constructor be used instead of init(), to initialize servlet?

486


What is a jsp page?

509


Which method cannot be overridden in jsp?

485


Explain jsp lifecycle methods?

514


How many tags are there in jsp?

474


What is jsp and how it works?

481


How do you delete the session data?

504