I promise!
I've never done this before and I can find no help in any of the Sun
tutorials. I'm trying to set the properties in a Bean with a servlet and
get those properties with a JSP. I believe I am doing everything correctly,
but I'm getting NULLs (no NullPointerExceptions, I'm getting "NULL" as HTML)
on the JSP as returns for the Bean's getters.
The Bean DECLARES the properties:
public class UserBean implements serializable {
private String something;
public String getSomething() {
return something;
}
public void setSomething( String thing) {
this.something = thing;
}
...
}
The servlet SETS the properties:
...
UserBean userbean = new UserBean();
userbean.setSomething( String string);
...
And the JSP GETS the properties:
...
<jsp:useBean id="user" class="UserBean" scope="session" />
<jsp:getProperty name="user" property="something" />
...
Pretty straightforward, right? Why am I getting "NULL" in the JSP instead
of the string set by the servlet? Am I missing something in the JSP
getProperty? Is the servlet setting the properties correctly? One
additional point, the code helper (class/method dot popups) in Forte does
not display any of UserBean's methods when I type "userbean." (userbean +
period).
Thanks,
Mark
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html