In your bean class you have som functions called getXxxx and setXxxx.
When you whant to access these properties from a .jsp file you must use
property="xxxx" and NOT property="Xxxx". In your case use
property="path" and NOT property="Path" 

Håkon Larsson :o)


-----Original Message-----
From: Carlos [mailto:[EMAIL PROTECTED]]
Sent: 14. mars 2001 10:01
To: [EMAIL PROTECTED]
Subject: jsp:usebean and setProperty


in a jsp file i put:
<%@page import ="Contador"%>
<%String conta=application.getInitParameter("contadorDir");
String IP=request.getRemoteAddr();
%>
<jsp:useBean id="contador" class="Contador" scope="session">
<jsp:setProperty name="contador" property="Ip" value="<=%IP%>"/>
<jsp:setProperty name="contador" property="Path" value="<%=conta%>"/>
</jsp:useBean>

this doesn't work why?

but if i put:
<%@page import="Contador"%>
<%String conta=application.getInitParameter("contadorDir");
%>
<jsp:useBean id="contador" class="Contador" scope="session">
</jsp:useBean>
<%
String Ip = request.getRemoteAddr();
contador.setIp(Ip);
contador.setPath(conta);
%>

it works.
why setProperty doesn't work?
thanks
Carlos


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to