how JSP can extend servlet or interface ...?
Answers were Sorted based on User's Feedback
Answer / aashish r. wadhokar
no, We cannot implement an interface in a jsp bcoz jsp is an
file not a class as well as jsp is converted into a servlet
class
and this translation(jsp file to servlet class) is done by
jsp engine so we cant implement interface in jsp file.
yes, we can extend a class in jsp page using extends keyword
using extends attribute of the page directive.
eg: extends "com.classes.class"
Is This Answer Correct ? | 16 Yes | 1 No |
Answer / aashish r. wadhokar
no, We cannot implement an interface in a jsp bcoz jsp is an
file not a class as well as jsp is converted into a servlet
class
and this translation(jsp file to servlet class) is done by
jsp engine so we cant implement interface in jsp file.
yes, we can extend a class in jsp page using extends keyword
using extends attribute of the page directive.
eg: extends "com.classes.class"
Is This Answer Correct ? | 16 Yes | 2 No |
Answer / jayakrishna
We cannot implement an interface in a jsp but we can extend
a class in JSP by using extends attribute of the page
directive.
extends "package.class"
The fully qualified name of the superclass of the Java
class file this JSP file will be compiled to. Use this
attribute cautiously as it can limit the JSP container's
ability to provide a specialized superclass that improves
the quality of the compiled file.
Is This Answer Correct ? | 7 Yes | 4 No |
What are the benefits of using servlet over cgi?
Explain how to improve Servlet Performance?
How the JSP file will be executed on the Server side?
Can we refresh servlet in client and server side automatically?
How servlets can be automatically reloaded?
Hi Friends, Can we make any method thread safe withour synchronized keyword?
How can you start a jta transaction from a servlet deployed on jboss?
What is the effective way to make sure all the servlets are accessible only when user has a valid session?
Can you send an authentication error from a servlet?
What are the mechanisms used by a servlet container for maintaining session information?
What are all the advantages of servlet over cgi?
What are the types of an http request?