how JSP can extend servlet or interface ...?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a generic servlet?

526


What are its drawbacks of cgi?

576


What is the purpose of inter-servlet communication?

601


What is the difference between genericservlet and httpservlet

594


Difference between java beans & servlets?

597






Does servlet have main method?

698


How do you invoke a Servlet? What is the difference between doPost method and doGet method?

653


Define servlet mapping?

666


Why do you use session tracking in httpservlet?

643


What is the difference between context parameter and context attribute?

539


What are different ways for authentication of servlet?

533


What is the difference between sendredirect() and forward() in a servlet?

531


How httpservlet is different from the genericservlet?

574


Explain the methods of request dispatcher in servlet?

527


List out difference between a JavaBean from a Servlet?

572