Switch to full style
JSP Code Examples
Post a reply

Using a Constructor in jsp

Sat Jan 17, 2009 1:51 am

using a constructor in JSP page ,i call the constructor of the class Home

Code:
<HTML>
    <
HEAD>
        <
TITLE>JSP and Using a Constructor</TITLE>
    </
HEAD>

    <
BODY>
    <
H1>Using a Constructor</H1>

    <% 
mybeans.Home H = new mybeans.Home("JSP Examples Home"); %>

    
Home is : <%= H.HomeName() %> 
  </
BODY>
</
HTML>
 


Code:

package mybeans
;

public class 
Home
{
    
String HomeName;

    public 
Home(String Name
    {
        
HomeName Name;
    }

    public 
String HomeName() {
      return 
HomeName;
    }
}
 




Re: Using a Constructor in jsp

Fri Apr 08, 2011 4:00 pm

hello sir can u tell me wat exactly happend here in ur code

Re: Using a Constructor in jsp

Sat Aug 20, 2011 6:58 pm

Just simple of creating object in JSP and calling constructor .

Post a reply
  Related Posts  to : Using a Constructor in jsp
 What Are Constructor Methods?     -  
 using of String constructor     -  
 Class with a Constructor in php     -  
 Copy Constructor     -  
 class with constructor parameter     -  
 cannot find symbol constructor     -  

Topic Tags

Servlets/JSP