thanq ... actually ... iam having the com.rss.rp.TmInfo class as : package com.rss.rp;
public class TmInfo implements java.io.Serializable{ private int tNo; private int eNo; private String pC; private String wA; public TmInfo(int tNo, int eNo,String pC,String wA) { this.tNo = tNo; this.eNo = eNo; this.pC=pC; this.wA=wA; } public int getTNo() { return tNo; } public int getENo() { return eNo; } public String getPC() { return pC; } public String getWA() { return wA; } } ----------------------------------------------------------------------- DAO class: import java.util.ArrayList; public class TMDAO { public static Connection conn; public static PreparedStatement stmt; public static PreparedStatement pstmt; public static String url; public static String driver; public static String userName; public static String passWord; public static TmInfo getTmInfo(int eNo){ TmInfo tMObj = null; try{ url = "jdbc:mysql://localhost:3306/mydb"; driver = "com.mysql.jdbc.Driver"; userName = "root"; passWord = "root"; Class.forName(driver); conn = (Connection) DriverManager.getConnection(url,userName,passWord); stmt= conn.prepareStatement("select * from tminfo where empno=?"); stmt.setInt(1,eNo); System.out.println("Connected to the database"); ResultSet rs=stmt.executeQuery(); System.out.println("-rs-TMDAO"); while(rs.next()) tMObj= new TmInfo(rs.getInt(1),rs.getInt(2),rs.getString(3),rs.getString(4)); System.out.println("Disconnected from database"); conn.close(); }catch(Exception e){ e.printStackTrace(); } return tMObj; } public static ArrayList<TmInfo> getTmView(int tNo){ TmInfo tMObj = null; ArrayList<TmInfo> al=new ArrayList<TmInfo>(); try{ url = "jdbc:mysql://localhost:3306/mydb"; driver = "com.mysql.jdbc.Driver"; userName = "root"; passWord = "root"; Class.forName(driver); conn = (Connection) DriverManager.getConnection(url,userName,passWord); stmt= conn.prepareStatement("select * from tminfo where teamno=?"); stmt.setInt(1,tNo); System.out.println("Connected to the database"); ResultSet rs=stmt.executeQuery(); System.out.println("-rs-TMDAO"); while(rs.next()) { tMObj= new TmInfo(rs.getInt(1),rs.getInt(2),rs.getString(3),rs.getString(4)); System.out.println("TmIfo : "+tMObj.getTNo()); al.add(tMObj); } System.out.println("Disconnected from database"); conn.close(); }catch(Exception e){ e.printStackTrace(); } return al; } } -------------------------------------------------------- this class act like controll class class ArrayList<TmInfo> tMObj=TMDAO.getTmView(tNo); HttpSession eSObj=request.getSession(); eSObj.setAttribute("tMObj",tMObj); ---------------------------------------------------------------- acessing the sessionScopse Obj here : <%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%> <jsp:include page="TitlePage.jsp"></jsp:include> <html> <br> <body><center> <table border=1 bordercolor=lightgreen> <tr> <td>TeamNo</td> <td>EmpNo</td> <td>ProjectCode</td> <td>WorkAssign</td> </tr> <c:forEach var="tMObj" begin="0" items="${sessionScope.tMObj}"> <tr> <td><c:out value="${tMObj.tNo}"/></td> <td><c:out value="${tMObj.eNo}"/></td> <td><c:out value="${tMObj.pC}"/></td> <td><c:out value="${tMObj.wA}"/></td> </tr> </c:forEach> </table> </center></body></html> ------------------------------------------------ iam gettting an exception : expection: javax.el.PropertyNotFoundException: Property 'tNo' not found on type com.rss.rp.TmInfo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en -~----------~----~----~----~------~----~------~--~---