一个关于jsp中调用javabean的问题。 把BEAN的源码帖出来看看,userCheck没有有初始化?另外服务器设置正确? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <%@ page import ="MyProjects.Exceed.utl.ExceedUserCheck" %><%@page contentType="text/html;charset=gb2312"%><jsp:useBean id="MyUserCheck" scope="session" class="MyProjects.Exceed.utl.ExceedUserCheck" type="MyProjects.Exceed.utl.ExceedUserCheck" /><jsp:setProperty name="MyUserCheck" property="*"/><html><head><title>Welcome to you!</title></head><body><p><%=MyUserCheck.getUserCheck()%></p></body></html> 估计问题在bean里的getUserCheckbean里要符合一定的规范,如下private String userCheck=null;public string getUserCheck(){return this.userCheck;}public void setUserCheck(String userCheck){this.userCheck=userCheck} 既然问题在这句<p><%=MyUserCheck.getUserCheck()%></p>我想应该是这个方法没有返回值吧…… struts2 设置默认拦截器,就发生死循环,求帮助 页面中集成了strut2中标签调用el表达式 关于POI读取EXCEL的activex控件中checkbox的问题 触发器的问题! 可以说是巨简单的送分题,在线wait 请问对于已经布署好的web应用, 如何反过来打一个war包? 关于分页显示的想法 字符串转换成实数的问题 请问session.getAttribute()与session.getValue()有区别吗? 还没有解决:把时间插入数据库的问题 哪为能给我resin下的数据库连接或者连接池? 需要有Unix 服务器开发JSP系统的兼职程序员!
<%@page contentType="text/html;charset=gb2312"%>
<jsp:useBean id="MyUserCheck" scope="session" class="MyProjects.Exceed.utl.ExceedUserCheck" type="MyProjects.Exceed.utl.ExceedUserCheck" />
<jsp:setProperty name="MyUserCheck" property="*"/>
<html>
<head>
<title>Welcome to you!</title>
</head>
<body>
<p><%=MyUserCheck.getUserCheck()%></p>
</body>
</html>
bean里要符合一定的规范,如下
private String userCheck=null;
public string getUserCheck()
{
return this.userCheck;}
public void setUserCheck(String userCheck)
{
this.userCheck=userCheck}
我想应该是这个方法没有返回值吧……