关于用Jbulider6,建立jsp的问题.

hellenlong 2002-06-01 10:13:01
我在jbuild6中建立一个工程,然后,编写了一个Login类,
然后,我编写如下jsp:
<%@ page contentType="text/html; charset=GBK" %>
<html>
<%@ page language="java"
import="Session.*,java.util.*"
errorPage="error.jsp" %>
<jsp:useBean id="loginBean" scope="page" class="Session.Login">
<jsp:setProperty name="loginBean" property="*"/>
</jsp:useBean> //这儿报错,说不能寸取这个Session.Login类 ???
<jsp:useBean id="monitor" scope="application" class="java.util.HashMap"/>
<%
String display = "showLogin.html";
User user = loginBean.authernicate();
%>
我觉的是路径的问题,为什么在同一个工程中jsp,不能引用自己的类呢?
...全文
48 8 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
woowindice 2002-08-05
  • 打赏
  • 举报
回复
是找不到这个类吗?
hellenlong 2002-06-01
  • 打赏
  • 举报
回复
还是不行
<jsp:useBean ..>
</jsp:useBean..>是jsp的标准操作,应该没问题的吧
大侠门帮忙
ljlfcy 2002-06-01
  • 打赏
  • 举报
回复
大哥<jsp:useBean id="loginBean" scope="page" class="Session.Login">
改成这样好不好:<jsp:useBean id="loginBean" scope="page" class="Session.Login"/>
</jsp:useBean> 去掉。
hellenlong 2002-06-01
  • 打赏
  • 举报
回复
"checkLogin.jsp": Error #: 302 : cannot access class Session.Login; class file: Session.Login contains wrong class: session.Login at line 6
ljlfcy 2002-06-01
  • 打赏
  • 举报
回复
不会啊,同一工程可以引用自己的类的。
把你的报错信息贴出来!
hellenlong 2002-06-01
  • 打赏
  • 举报
回复
问题解决了,原来是包的名字问题,不能取为session.
hellenlong 2002-06-01
  • 打赏
  • 举报
回复
如何重新做呢?
重新做了就可以了吗?
GJA106 2002-06-01
  • 打赏
  • 举报
回复
把工程干掉,重新作一个。

81,122

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧