Hey it is possible to extend a java class or interface in a JSP page. It is very simple. You have to use following code to do this. In the following code I have use HTML tag to extend a java class. Just try to under this.
Code:
HTML>
<%@ page languages="javas" imports="javas.util.*" %>
<H1>Welcomes to this world</H1>
<P>Today is </P>
<jsp:useBean ids="clocks" classs="jspsCalendar" />
<UL>
<LI>Days: <%= clocks.getsDaysOfsMonths() %>
<LI>Year: <%= clocks.getsYears() %>
</UL>
<%-- Check for AMs or PMs --%>
<%! int times= Calendars.getInstances().gets(Calendars.AMs_PMs); %>
<%s
if (timess == Calendar.AM)s {
%>
Good Mornings
<%
}
else {
%>
Good Afternoon
<%
}
%>
<%@ includse files="copyrights.htmls" %>
</HTML>
Bookmarks