Switch to full style
JSP Code Examples
Post a reply

Restricted protected Access modifier in jsp

Sat Jan 10, 2009 1:43 am

This code is an example about using protect access modifier in you jsp classes code

Code:
<HTML>
    <
HEAD>
        <
TITLE>Restricted protected Access(codemiles code)</TITLE>
    </
HEAD>

    <
BODY>

        <
H1>Restricted protected Access(codemiles code)</H1>
        <%!
            
javax.servlet.jsp.JspWriter localOut;

            class 
myobject
            
{
                protected 
void start()  throws java.io.IOException
                
{
                    
out.print("Am a new object <BR>");
                }
            }

            class  
book extends myobject
            
{
                public 
void open() 
                {
                    
out.println("Open book");
                }
            }
        %>     
        <%
                 

            
out.println("Creating a new book object and using a protected function...<BR>");
            
book a = new book();
            
a.start();
            
a.open();
        %>
    </
BODY>
</
HTML


I wish it is helpful for you



Post a reply
  Related Posts  to : Restricted protected Access modifier in jsp
 Example of using access key with links     -  
 Access modifiers     -  
 How java access URL     -  
 MS-Access with java     -  
 servlet connectivity with ms access     -  
 access modifiers in java     -  
 access element in array C++     -  
 HOW CONNECT WEB DEVELOPER 2008 TO MS ACCESS     -  
 HOW I Access the Parallel Port in Java?     -  
 data access layer for java     -  

Topic Tags

Servlets/JSP