jsp不懂之处

04-10-22 pzliang16
请阁下指点一下,要怎样配置resin才能找到class呢???

例如:

Testbean.java

public class Testbean{

private String stringValue;

private int num;

public Testbean(){

stringValue="This is the initial value";

num=0;

}

public void setValue(String avalue){

stringValue=avalue;

}

public String getValue(){

return stringValue;

}

public void setNumber(int number){

num=number;

}

public int getNumber(){

return num;

}

}

bean.jsp

<jsp:useBean id="sessionbean" class="Testbean" scope="session"/>

<%

sessionbean.setValue("this is set by session bean");

%>

<html>

<body>

<a href="session.jsp">session</a>

</body>

</html>

这个jsp要用到Testbean,但这个class从何找呢???

要怎样配置resin呢??

要把这个class放在哪呢???

请你指点一下,谢谢!!!

发到我的信箱里就可以了!!pzliang16@163.com

猜你喜欢