JSP:
<html><body>
<jsp:useBean id = "bean" class="JBean" />
<jsp:setProperty name="bean" property="*">
Title : <%=bean.getTitle()%> <br>
Num : <jsp:getProperty name="bean" property="num" />
</body></html>
Bean class:
public class JBean
{
private String title = "JBean";
private int num;
public void setTitle(String t){ this.title = t; }
public String getTitle(){ return this.title; }
public void setNum(int n){ this.num = n; }
public int getNum(){ return this.num; }
}
THis is the URL
http://localhost:7001/test/First.jsp?title=Hello The response printed was
Title : null
Num : 0
Shouldn't Title be printed Hello instead of null since property="*" ???