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 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it good idea to create servlet constructor?

1021


How can the referrer and the target urls be used in servlet?

758


Why are http servlets used in programming?

773


How do you deal property files in servlet?

825


What is string tokenizer?

850


What is the difference in between the httpservlet and generic servlet?

903


Write a program to show the functionality of servlets.

780


What are the different methods involved in the process of session management in servlets?

943


What is the use of welcome-file-list?

801


What is the difference between Server and Container?

925


What is difference between the HTTP Servlet and Generic Servlet? Explain about their methods and parameters?

863


What is life cycle of Servlet?

837


What are the important functions of filters?

845


How is a servlet implemented in code?

824


What is a deployment descriptor?

871