Create the Interface attributes / member variables as "public static " 
attributes.

Then in the JSP use the attribute and set the value into pageContext.

then u can easily use it wityh Struts tag libs.

Thanks and regards,
Pazhanikanthan. P (Paz)

Consultant for AXA,
Senior Software Engineer,
HCL Australia Services Pty. Ltd.
Off   : +61-3-9618-4085
Mob : +61-0411-354-838




Ashish Vijaywargiya <[EMAIL PROTECTED]>
07/09/2006 02:11 PM
Please respond to "Struts Users Mailing List"
 
        To:     Struts-Users Mailing List <user@struts.apache.org>
        cc: 
        Subject:        How to access Static Data in jsp file


Hello,

I created an Interface as the code shown below :

public interface StaticData {
    String[] minutes = { "01", "02", "03", "04", "05", "06", "07", "08", 
"09",
            "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
"20",
            "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", 
"31",
            "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", 
"42",
            "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", 
"53",
            "54", "55", "56", "57", "58", "59" };

    String[] hours = { "00", "01", "02", "03", "04", "05", "06", "07", 
"08",
            "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", 
"19",
            "20", "21", "22", "23" };
}


I would like use this values in jsp file with the help of <jsp:useBean> & 
<bean:define>.And then I would like to populate resulted value in combo 
box.

Can anybody of you tell me how to access this values in jsp file ???
I don't want to create the getter() setter() methods for it.

Thanks in advance.
Regards
Ashish Vijaywargiya



 
---------------------------------
How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call 
rates.

_____________________________________________________________________ 
This e-mail has been scanned for viruses by MCI's Internet Managed 
Scanning Services - powered by MessageLabs. For further information 
visit http://www.mci.com


*********************************************************************************
Important Note
This email (including any attachments) contains information which is 
confidential and may be subject to legal privilege.  If you are not 
the intended recipient you must not use, distribute or copy this 
email.  If you have received this email in error please notify the 
sender immediately and delete this email. Any views expressed in this 
email are not necessarily the views of AXA.   Thank you.
**********************************************************************************

Reply via email to