< HTML>
Using Restricted Access
Using Restricted Access
<%!
javax.servlet.jsp.JspWriter localOut;
class BaseClass
{
protected void start() throws java.io.IOException
{
localOut.println("Starting...
");
}
}
class DerivedClass extends BaseClass
{
public void drive() throws java.io.IOException
{
localOut.println("Driving...
");
}
}
%>
<%
localOut = out;
out.println("Creating an DerivedClass...
");
DerivedClass a = new DerivedClass();
a.start();
a.drive();
%>