我在myeclipse中使用javabean,为什么会不对啊,
来源:百度知道 编辑:UC知道 时间:2024/05/10 13:46:25
<%session.setAttribute("USERID","1"); %>
<%@ page import="com.buy.bean.coin.UsercoinSelectBean"%>
<%@ page import="com.buy.bean.coin.ConsumeSelectBean1"%>
<%@ page import="java.sql.*"%>
<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%>
<jsp:usebean id="selectUsercoinBean" class="com.buy.bean.coin.UsercoinSelectBean" scope="request"></jsp:usebean>
<body topmargin="0">
<%String ID =(String)session.getAttribute("USERID");
String balance = selectUsercoinBean.selectUsercoin(ID,0);
String Consume = selectUsercoinBean.selectUsercoin(ID,1);
String All = selectUsercoinBean.selectUsercoin(ID,2);
String NAME = selectUsercoinBean.selectUsercoin(ID,3);
String TYPE = selectUsercoinBean.selectUsercoin(ID,4);
<%@ page import="com.buy.bean.coin.UsercoinSelectBean"%>
<%@ page import="com.buy.bean.coin.ConsumeSelectBean1"%>
<%@ page import="java.sql.*"%>
<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%>
<jsp:usebean id="selectUsercoinBean" class="com.buy.bean.coin.UsercoinSelectBean" scope="request"></jsp:usebean>
<body topmargin="0">
<%String ID =(String)session.getAttribute("USERID");
String balance = selectUsercoinBean.selectUsercoin(ID,0);
String Consume = selectUsercoinBean.selectUsercoin(ID,1);
String All = selectUsercoinBean.selectUsercoin(ID,2);
String NAME = selectUsercoinBean.selectUsercoin(ID,3);
String TYPE = selectUsercoinBean.selectUsercoin(ID,4);
selectUsercoinBean---一直说不能识别处理,这说明<jsp:usebean id="selectUsercoinBean" class="com.buy.bean.coin.UsercoinSelectBean" scope="request"></jsp:usebean> 这段代码有问题,检查一下路径是否正确。
你引用了两次,去掉<%@ page import="com.buy.bean.coin.UsercoinSelectBean"%>就可以了
把错误贴出来吧。。
对JavaBean在JSP里面要是按你这么使用,必须有一个参数为空的构造函数,是不是这个地方的问题?
另外,确保没有拼写错误。:)
我在myeclipse中使用javabean,为什么会不对啊,
请问一下在 MyEclipse中使用JAVABEAN的过程
如何在myeclipse中安装使用strtus国际化的插件?
MyEclipse中使用Struts出错
在myeclipse中怎么配置tomcat
在MYECLIPSE中如何创建EJB
为什么我的myEclipse不能在WebProject中新建HTML和JSP文件呢?
为什么在Myeclipse中使用Junit之后,以下这句话总是有错误(import junit.framework.TestCase;)
使用MyEclipse运行JSP,在地址栏里输什么?
在myeclipse中,我导入了struts1.2 的包,可是在jsp页面里,为什么不提示标签呢?