0 Replies Latest reply: Feb 14, 2009 11:42 PM by 843807 RSS

    java bean - urgent help

    843807
      Hi,

      I am creating a java bean in a jsp file. I want to pass this bean to a java class in the same jsp file.
      eg:

      A1.jsp

      <jsp:useBean id="customer" class="com.Customer" scope="session"/>
      <jsp:setProperty name="customer" property="*"/>

      <% Teller teller=new Teller();
      int custid=teller.addCustomer("customer");
      %>

      Teller.java

      public class Teller
      {

      public int addCustomer(*C*ustomer pcus)
           {
                CustomerDb Cdb=new CustomerDb();
                return Cdb.addCustomer(pcus);
           }
      }


      CustomerDb.java

      public class CustomerDb{
      int customerid;

      public int addCustomer(*C*ustomer pcus){
           try{

      some code....

      }

      When I try to compile Teller.java and CustomerDb.java it is giving error in the lines highlighted with bold.

      Please help in this.