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

Explain is servlet mapping?

766


How a servlet is unloaded?

810


What is the purpose of requestdispatcher interface?

828


What is a web application and what is it’s directory structure?

819


Which interface must be implemented by all servlets?

1035


What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?

778


What are the different types of servlets?

755


How many objects of a servlet is created?

1008


Difference between doget and dopost?

911


How to handle exceptions thrown by application with another servlet?

820


What is a server side include (ssi)

783


Can you create a deadlock condition on a servlet?

796


What if you need to span your transaction across multiple servlet invocations?

807


What is the web server used for running the Servlets?

765


hi actully i hav form columns with origin and destination names .as like as i need to create one more column with name amount. my requirement is when i select origin and destination columns automatically i need to get amount from database.how can i. please tel me with relative code

2519