Jsp -Bean object handling

Discussions

General J2EE: Jsp -Bean object handling

  1. Jsp -Bean object handling (2 messages)

    I have created a bean and used it in jsp page using <jsp:useBean id="conn" class="atul.payroll.DBConnection" scope="session"> tag.

    I have declared its scope to session variable.

    I don't have any problem while accessing "conn" in that page, but whenever i use "conn" variable in another jsp page it gives me error that "undefined variable:conn"

    plz help me out

    Threaded Messages (2)

  2. Jsp -Bean object handling[ Go to top ]

    You'll have to put the useBean in on the other page as well, if the "conn" has already been created then the useBean will find it and return it for use.
  3. Succesful execution[ Go to top ]

    Thanks Duncan,
    Now everything is working fine.