You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dinesh Keesara <kd...@hotmail.com> on 2004/09/24 06:47:44 UTC

jsp:usebean not working --Accessing Bean From JSP -- irritating problem

the following code is working perfectly:


<%@page import="com.dinesh.*" %>
<% IdCard myidcard=new IdCard();%>
<%
myidcard.setName("HariKiran");
myidcard.setRollNo("123");
%>
<%=myidcard.getName()%>
<br>
<%=myidcard.getRollNo()%>

but if i replace it with jsp:usebean tag it is not working  like this :

<%@page import="com.dinesh.*" %>
<jsp:usebean id="myidcard"  class="com.dinesh.IdCard" scope="page">
<jsp:setProperty name="myidcard" property="rollNo" value="123" >
<jsp:setProperty name="myidcard" property="name" value="Harikiran" >
<%=myidcard.getName()%>
<br>
<%=myidcard.getRollNo()%>
</jsp:usebean>

_________________________________________________________________
Is cricket your religion? Check out the cricket shop! 
http://www.msn.co.in/Shopping/CricketShop/  CDs, books ‘n all things 
cricket!


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org