how JSP can extend servlet or interface ...?

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to make sure a servlet is loaded at the application startup?

558


Why the container loads server at the application startup and how?

582


How the servlet is loaded?

599


Explain in brief the directory structure of a web application?

571


When servlet object is created?

604






What are the types of an http request?

585


Which event is fired at the time of setting, getting or removing attribute from application scope?

615


Explain request dispatcher and its methods.

585


When is the servlet instance created in the life cycle of servlet? What is the importance of configuring a servlet?

576


Define servlet mapping?

660


List out difference between a JavaBean from a Servlet?

566


What are the different methods of session management in servlets?

540


What exception should be thrown when servlet is not properly initialized?

555


Explain the difference between get and post method in servlet?

606


What are the jobs performed by servlets?

584