how JSP can extend servlet or interface ...?

Answers were Sorted based on User's Feedback



how JSP can extend servlet or interface ...?..

Answer / 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

how JSP can extend servlet or interface ...?..

Answer / 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

how JSP can extend servlet or interface ...?..

Answer / jayakrishna

We cannot implement an interface in a jsp but we can extend
a class in JSP by using extends attribute of the page
directive.

extends "package.class"
The fully qualified name of the superclass of the Java
class file this JSP file will be compiled to. Use this
attribute cautiously as it can limit the JSP container's
ability to provide a specialized superclass that improves
the quality of the compiled file.


Is This Answer Correct ?    7 Yes 4 No

Post New Answer

More Servlets Interview Questions

Differentiate between the get and post method

0 Answers  


where the session data will stored?

4 Answers  


Difference between jakarta tomcat and apache Tomcat?

4 Answers   IBM,


Hi friends, am newbie to servlet. My interviewer asked why used servlet in your application. i used servlet for controller logic and business logic . is it correct ?

5 Answers   TCS,


How can we refresh automatically when new data has entered the database?

0 Answers  






we cant Override Jsp Service method?Why?

4 Answers   Infrasoft, Mind Tree,


Which application server is best for java?

0 Answers  


What is Difference between JavaBeans and taglib directives?

3 Answers  


Write a program to show the functionality of doget and dopost method?

0 Answers  


How does Cookies work in Servlets?

0 Answers  


What is context switching?

6 Answers  


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

0 Answers   CTS,


Categories