Hi,
I think ur set property should look like this
......
<hr>before ==
<jsp:getProperty name="bean1" property="userId" />
<jsp:setProperty name="bean1" property="userId" value="boo" />
<hr>after ==
<jsp:getProperty name="bean1" property="userId" />
......
The property should be userId not UserId (note the case of u)
HTH
Sudhi
> -----Original Message-----
> From: Siegel, Craig [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 27, 2001 3:49 PM
> To: [EMAIL PROTECTED]
> Subject: HELP with jsp:useBean
>
>
> The code below produces the following output:
> ---------------------------------------
> before ==
> --------------------------------------
> after ==
>
> I would expect, however, to see
> ---------------------------------------
> before ==
> --------------------------------------
> after == boo
>
> Does anyone know what I am doing wrong?
>
> ********************************************
> JSP code
> ******************************************
> <%@ language="java" %>
> <%@ import="beantest.*" %>
> <html>
> <head>
> <title>This is another test</title>
> </head>
> <body>
> <jsp:useBean id="bean1" scope="page" type="TestBean"
> class="TestBean" />
>
> <hr>before ==
> <jsp:getProperty name="bean1" property="UserId" />
>
> <jsp:setProperty name="bean1" property="UserId" value="boo" />
>
> <hr>after ==
> <jsp:getProperty name="bean1" property="UserId" />
>
> </body>
> </html>
>
> *****************************************
> TestBean bean code
> *****************************************
> public class TestBean {
> private String fieldUserId = new String();
>
> public TestBean() {
> super();
> }
>
> public String getUserId() {
> return fieldUserId;
> }
> public void setUserId(String userId) {
> fieldUserId = userId;
> }
> }
>
> ==============================================================
> =============
> To unsubscribe: mailto [EMAIL PROTECTED] with body:
> "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets