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

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

1825


Who is responsible for writing a constructor?

783


Explain servlet life cycle?

625


Where do you define dispatcherservlet?

557


How to generate the server side programming and the advantages of it over the other languages?

567






What are the disadvantages of storing session state in cookies?

633


What is the disadvantage of cookies?

588


Explain in brief the directory structure of a web application?

579


What are the uses of servlet

639


When servlet is loaded?

600


Explain the difference between generic servlet and http servlet?

545


What is the dispatcher servlet?

522


What is webservlet?

543


Explain web application directory arrangement?

597


Why do we need a constructor in a servlet if we use the init method?

522