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 servlet? Explain

794


What is the use of request dispatcher interface?

793


What’s the difference between genericservlet and httpservlet?

759


Explain the lifecycle of a servlet?

735


What is the difference between the servlets and cgi programs?

757


Why are servlets used?

775


Explain the jar and war files in servlet?

824


What methodology can be followed to store more number of objects in a remote server?

2040


Explain the servlet context.

824


How can you push data from an Applet to a Servlet?

857


Whether we can get deadlock situation in servlets?

826


What is the need of servlet filters?

755


What is the difference between get and post methods?

804


What is the difference between the include() and forward() methods?

826


Why doesn’t a servlet include main()?

796