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

Write a command to get actual path of a servlet to the server?

782


Explain servlet events?

781


What is difference between jsp and servlet?

922


What is a cookie What is the difference between session and cookie

845


What is the difference between servlet and filter?

748


How do I support both get and post from the same servlet?

978


Explain request dispatcher and its methods.

799


What are different ways for authentication of servlet?

756


What are the differences between forward() method and sendredirect() methods?

797


What is the life cycle of a servlet?

1148


What is servlet used for?

907


What is the use of attribute in servlets?

791


What is the procedure of invoking different servlet in a different application?

795


How can we include static files in the jsp page?

821


What is the use of welcome-file-list?

800