Hello,
I try to use JavaBean to set and get a String type, but it always goes
wrong.
The code is below:
JavaBean:
package test;
public class Count8 {
private String user ;
public Count8() {
}
public String getUser() {
return user;
}
public void setUser(String user) {
this.user = user;
}
}
and the JSP:
<html>
<head><title></title></head>
<body>
<jsp:useBean id = "h" class = "test.Count8" />
<h4> Users: <%= h.getUser() %>. <br>
</h4>
</body>
</html>
If I change user into int type, everything is O.K.
Why can I use string between JavaBean and JSP ?
How can I solve this problem ?
Thanx very much
Best Wishes
Yen-Ju
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
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