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
What is the need of servlet filters?
What is the difference between a generic servlet and http servlet?
How the typical servlet code look like ?
Does servlet have main method?
Elucidate servlet attributes and its scope?
What is servlet api used for conneting database?
Which interface must be implemented by all servlets?
What is the difference between servlet and jsp?
Is java servlet still used?
What is the major difference between servlet and applet?
Define context initialization parameters.
What is a java servlet?
Hello, My project requirement is like I need to create a web page using MVC pattern. I hava a bean class, jsp page, servlet, service and dao. My jsp has two fields. One is dropdown list. The option values has to get populated from the database table. The other one is a text box and its value has to come from database table. As of now I have defined the fields in bean class, got the values from database using arraylists in dao class and I called this from service class. Can anyone please tell me the workflow of how the servlet will get this arraylist and populate the arraylist values as dropdown options in jsp page? Also I would like to know the role of bean class in MVC pattern? Thanks in advance!
Why is it that we can't give relative URL's when using ServletContext.getRequestDispatcher() when we can use the same while calling ServletRequest.getRequestDispatcher()?
Which httpsession object is used to view and manipulate information about a session?