Total members 10262 | Gratitudes |It is currently Wed May 23, 2012 9:34 pm Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 3 posts ] 
Author Code Snippet
 Code subject: Using a Constructor in jsp
PostPosted: Sat Jan 17, 2009 1:51 am 
Offline
Mastermind
User avatar

Joined: Tue Mar 27, 2007 10:55 pm
Posts: 2279
Location: Earth
Has thanked: 39 time
Have thanks: 61 time

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;
    }
}
 

_________________
Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )


TOP
 Profile Send private message  
Reply with quote  
 Code subject: Re: Using a Constructor in jsp
PostPosted: Fri Apr 08, 2011 4:00 pm 
Offline
Newbie
User avatar

Joined: Fri Apr 08, 2011 3:15 pm
Posts: 7
Has thanked: 0 time
Have thanks: 0 time
hello sir can u tell me wat exactly happend here in ur code


TOP
 Profile Send private message  
Reply with quote  
 Code subject: Re: Using a Constructor in jsp
PostPosted: Sat Aug 20, 2011 6:58 pm 
Offline
Mastermind
User avatar

Joined: Tue Mar 27, 2007 10:55 pm
Posts: 2279
Location: Earth
Has thanked: 39 time
Have thanks: 61 time
Just simple of creating object in JSP and calling constructor .

_________________
Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 3 posts ] 
Quick reply


  

 Similar topics
 Copy Constructor
 cannot find symbol constructor
 class with constructor parameter
 Class with a Constructor in php
 using of String constructor
 What Are Constructor Methods?

All times are UTC [ DST ]


Users browsing similar codes

Users browsing this forum: No registered users and 1 guest



Jump to:  
Previous Code Snippet | Next Code Snippet 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team