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

What is the difference between CGI and Servlet?

577


Which is the methods of generated servlet?

671


What is servlet in simple terms?

555


Why filter is used in servlet?

518


What is the difference between Servlet Request and Servlet Context when calling a Request Dispatcher?

594






When jsessionid is created?

597


How a servlet is unloaded?

585


What is the purpose of dispatcherservlet properties?

503


What is servlet? Explain

574


What do you mean by httpservlet?

557


Explain the different ways for servlet authentication?

518


What is the use of attribute in servlets?

534


What’s the difference between genericservlet and httpservlet?

519


Difference between forward() method and sendredirect() method ?

576


What is Request Dispatcher?

788