<jsp:useBean id="bc" class="com.go.Credentials" scope="session"/>
<%
out.println( bc.getUserid());
%>
I want to access the methods in my bean class Credentials. When I am trying to do so, I am getting null. Why?
<jsp:useBean id="bc" class="com.go.Credentials" scope="session"/>
<%
out.println( bc.getUserid());
%>
I want to access the methods in my bean class Credentials. When I am trying to do so, I am getting null. Why?
you get id value with
<jsp:getProperty name="bc" property="id"/>
or If you want scriplets
<%
int value=bc.getUserid();
out.print("user ID is : "+value);
%>