different types

hi everyoneim in a kind f situation where i want to pass object of ype my custom class Data in setter method. but in getter i need something of type List to be returned. how can i do this in a bean
[211 byte] By [rajitoora] at [2007-11-27 8:12:31]
# 1
Eh? Simply write those methods
georgemca at 2007-7-12 19:56:54 > top of Java-index,Desktop,Developing for the Desktop...
# 2

Write those methods in Bean

public List getEmplist()

{

List list = new List();

// your Code

return list

}

In JSP

<jsp:useBean id="lstemp" class="com.empData" scope="request"/>

<%

List lstEmp = new List();

lstEmp = lstemp.getEmplist();

// Your Code here

%>

//PremInd

http://anupampawar.googlepages.com

PremInda at 2007-7-12 19:56:54 > top of Java-index,Desktop,Developing for the Desktop...