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 is called a session?
When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?
Can I override destroy() method of Servlets?
Describe some assignments that are executed by servlet container?
What is difference between ServletResponse sendRedirect() and RequestDispatcher forward() method?
Write a program to show the functionality of servlets.
What is Servlet API used for connecting database?
What do you mean by httpservlet?
What is difference between get and post method?
What is the major difference between servlet and applet?
What is DSN and System DSN and what is the difference between them?
What is the difference between get and post methods?