游
游委宾
Unregistered / Unconfirmed
GUEST, unregistred user!
我用WebLogic7.0,建立一个Web Application,名称为“developer”,
路径为:d:/web/developer,然后建立一个Virtual Host,名称为“developer”,
Default Web App选择为“developer”
在执行到"registerProc.jsp"时,出现如下出错信息:
Parsing of JSP File '/registerProc.jsp' failed:
--------------------------------------------------------------------------------
/registerProc.jsp(12): class 'com.developer.forum.UserManager' could not be loaded
probably occurred due to an error in /registerProc.jsp line 12:
<jsp:useBean id="userManager" class="com.developer.forum.UserManager" scope="page" />
该jsp的代码如下:
<%@ page contentType="text/html;charset=gb2312" %>
<%
/*
* 页面功能:用户注册处理
* 作 者:游委宾
× 建立日期:2002-12-2
× 最后修改:2002-12-2
*/
%>
<!-- 根据昵称判断新用户是否存在,如果存在则显示出错信息,否则注册新用户,注册成功后显示提示信息 -->
<jsp:useBean id="userManager" class="com.developer.forum.UserManager" scope="page" />
<%
if (userManager.isUserExists(request.getParameter("nickname")))
{
response.sendRedirect("message.jsp?MessageType=mtUserExists");
}
else
{
response.sendRedirect("message.jsp?MessageType=mtRegisterSucc");
}
%>
<jsp:useBean id="user" class="com.developer.forum.User" scope="page" />
<jsp:setProperty property="*" name="user" />
<%
userManager.addUser(user);
session.setAttribute("user", user);
response.sendRedirect("message.jsp?MessageType=mtRegisterSucc");
%>
注意:在d:/web/developer下有如下目录结构:com/developer/forum,目录下有三个.class文件
,分别是User.class、ForumDb.class、UserManager.class
路径为:d:/web/developer,然后建立一个Virtual Host,名称为“developer”,
Default Web App选择为“developer”
在执行到"registerProc.jsp"时,出现如下出错信息:
Parsing of JSP File '/registerProc.jsp' failed:
--------------------------------------------------------------------------------
/registerProc.jsp(12): class 'com.developer.forum.UserManager' could not be loaded
probably occurred due to an error in /registerProc.jsp line 12:
<jsp:useBean id="userManager" class="com.developer.forum.UserManager" scope="page" />
该jsp的代码如下:
<%@ page contentType="text/html;charset=gb2312" %>
<%
/*
* 页面功能:用户注册处理
* 作 者:游委宾
× 建立日期:2002-12-2
× 最后修改:2002-12-2
*/
%>
<!-- 根据昵称判断新用户是否存在,如果存在则显示出错信息,否则注册新用户,注册成功后显示提示信息 -->
<jsp:useBean id="userManager" class="com.developer.forum.UserManager" scope="page" />
<%
if (userManager.isUserExists(request.getParameter("nickname")))
{
response.sendRedirect("message.jsp?MessageType=mtUserExists");
}
else
{
response.sendRedirect("message.jsp?MessageType=mtRegisterSucc");
}
%>
<jsp:useBean id="user" class="com.developer.forum.User" scope="page" />
<jsp:setProperty property="*" name="user" />
<%
userManager.addUser(user);
session.setAttribute("user", user);
response.sendRedirect("message.jsp?MessageType=mtRegisterSucc");
%>
注意:在d:/web/developer下有如下目录结构:com/developer/forum,目录下有三个.class文件
,分别是User.class、ForumDb.class、UserManager.class