RE: can we implement an interface in jsp?if yes how ?i...
Hi
i think only a class or interface can implement an interface and should implements all the methods defined in that interface but incase of jsp the webcontainer is creating the instances and call the respective methods that is defined in that container.So we cant implement interfaces in jsp.
RE: can we implement an interface in jsp?if yes how ?i...
In "Page" directive you have "extends" attribute which allows you to extend you class by jsp. They why i can not implement my interface......?????? First solution:: i can do it by implementing my interface by my class and then i can use "Page" directive which have "extends" attribute which allows me to extend my class by jsp.
But i want only to implement my interface, don't want to extend a class then what will i do??????????????
RE: can we implement an interface in jsp?if yes how ?i...
You can actually extend a class within a JSP right.
Now take a template class make that class implement all your required interfaces and then make your JSP extend that template class and provide the functionalitywithin the JSP for all the interface methods.
Try this way. I havent tried it but it should work this way.