Can we implement an interface in JSP Page?If yes How

Questions by anilpunia

Showing Answers 1 - 29 of 29 Answers

praveen kumar IBM

  • Sep 6th, 2006
 

PRAVEEN KUMAR IBM

we can't implement interface in JSP.

  Was this answer useful?  Yes

Anil Kumar

  • Sep 8th, 2006
 

Hi Praveen, U say we cannot implemet. Please provide me the reason behind this. I think we can implement using extends .....

  Was this answer useful?  Yes

bals

  • Sep 20th, 2006
 

extends used to extends class not interface

  Was this answer useful?  Yes

suman

  • Sep 27th, 2006
 

Hi praveen

        Iam suman(java) from prima impact software solutions.U say jsp can't implement interface,plz can u specify briefly........

                                

     

  Was this answer useful?  Yes

hari

  • Sep 27th, 2006
 

Hi,

What is the need for u to implement interfaces in JSP, if u want to implement an interface, as from the discussion, create an interface extend to a wrapper servlet, and extend that wrapper servlet into u r JSP... that's all, isn't that right ?

but dont forget  forget to make call to jsp_init.

  Was this answer useful?  Yes

Amit Saha

  • Nov 16th, 2006
 

I think there is no need to implement interface in jsp coz...as u know jsp is converted into internal servlet and servlets can implement interface as servlet is pure  java program....

  Was this answer useful?  Yes

jas

  • Nov 17th, 2006
 

we can use interfaces in jsp

<%@ page implements="interfacename" %>

  Was this answer useful?  Yes

ratikanta samal

  • Dec 5th, 2006
 

do you think  there is any attribute implement for page

  Was this answer useful?  Yes

Kanhaiya

  • Dec 11th, 2006
 

You can not implement interface in jsp. As we do't have implement attribute in jsp.

  Was this answer useful?  Yes

We can't implement an interface in JSP. Below are the page directive attributes which can be used in JSP pages:<%@ page [ language="java" ] [ extends="package.class" ] [ import="{package.class | package.*}, ..." ] [ session="true | false" ] [ buffer="none | 8kb | sizekb" ] [ autoFlush="true | false" ] [ isThreadSafe="true | false" ] [ info="text" ] [ errorPage="relativeURL" ] [ contentType="mimeType [ ;charset=characterSet ]" | "text/html ; charset=ISO-8859-1" ] [ isErrorPage="true | false" ] %> Examples<%@ page import="java.util.*, java.lang.*" %> <%@ page buffer="5kb" autoFlush="false" %> <%@ page errorPage="error.jsp" %>

my full explanation could not come in the reply, hence remaining portion putting again:<%@ page [ language="java" ] [ extends="package.class" ] [ import="{package.class | package.*}, ..." ] [ session="true | false" ] [ buffer="none | 8kb | sizekb" ] [ autoFlush="true | false" ] [ isThreadSafe="true | false" ] [ info="text" ] [ errorPage="relativeURL" ] [ contentType="mimeType [ ;charset=characterSet ]" | "text/html ; charset=ISO-8859-1" ] [ isErrorPage="true | false" ] %>

  Was this answer useful?  Yes

Arvind Kale

  • Dec 18th, 2012
 

We cant implement interface in JSP but we can use extends used to extends class not interface

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions