I have a
java bean I am using the complete a form. Here is an example of one of one of the form elements being completed:
<input type="text" size="25" name="email" value="<
jsp:getProperty name="contactData" property="email"/>">
In the bean I have the following member variable:
private
String email = "";
And the following methods:
public void setEmail (String email) {
this.email = email;
}
public String getEmail() {
return email;
}
A
servlet sets all the variables for the bean and than passed it through the Servlet Context to the JSP page. Using the useBean tag I get a reference to it.
This works great. The weird thing is there are two properties that return a blank even though they should have some value.
Example:
Here is what I have got on the page (one of the two problematic values):
<textarea rows="3" style="width: 500;" name="tagLine"><jsp:getProperty name="contactData" property="tagLine"/>
Here is the variable from the Bean Class:
private String tagLine = "";
Here are the methods:
public void setTagLine (String tagLine) {
this.tagLine = tagLine;
}
public String getTagLine() {
return tagLine;
}
It is being set like the other properties. Why does it not produce the correct value when I call the getProperty?
Thanks,
Luke