如何通过JSP向class中传值,应该怎么做?
我对JSP不是很熟悉,请各位帮忙!给个例子
------解决方案--------------------使用动作 <jsp:useBean>
<jsp:useBean id= "beanName " scope= "page " class= "package.className "/>
<jsp:setProperty id= "beanName " property= "propertyname "/>
------解决方案--------------------用JSP标签啊
------解决方案--------------------example:
public class Test{
public void aaa(String str){
//....
}
}
jsp:
Test test = new Test();
test.aaa( "string ");