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
How to include a jsp file in another jsp file?
How can you avoid scriptlet code in jsp?
What is tag file?
How can we forward the request from jsp page to the servlet?
Define Expression
Which attribute specifies a jsp page that should process any exceptions thrown but not caught in the current page? : Citibank
Explain translation phase.
Can you stop multiple submits to a web page that are initiated by clicking to refresh button?
Can jsp contain javascript?
Can we override jspinit method?
Explain some jsp life-cycle methods that can be overridden.
What are the standard actions available in jsp?
Can a constructor be used in place of init() method to initialize a servlet?
What is the difference between jsp and php?
Explain client-side and server-side validation.