how JSP can extend servlet or interface ...?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the war file?

598


Explain url encoding in servlet?

566


Is it good idea to create servlet constructor?

730


How do you configure a centralized error handler in servlets?

523


Why don't we write a constructor in a servlet?

576






What is the dispatcher servlet?

501


What is java servlet session?

515


What is the difference between context parameter and context attribute?

522


Can you refresh servlet in client and server-side automatically?

604


A client sends requests to two different web components. Both of the components access the session. Will they end up using the same session object or different session ?

595


What do you understand by mime type?

553


What is the difference between using getSession(true) and getSession(false) methods?

562


How do you find out what client machine is making a request to your servlet

520


Explain the features are in servlet 3?

590


What is the use of send redirect () method?

578