JSP的问题

来源:百度知道 编辑:UC知道 时间:2024/06/06 10:00:02
我的javabean代码如下:运行时结果出现了下面的错误

<%@ page contentType="text/html; charset=gb2312" language="java" import="com.jspdev.ch12.*,java.util.*,java.io.*" errorPage="error.jsp" %>
<%@ include file="trans.jsp"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<jsp:useBean id="category" class="com.hy828.ch12.ViewCategory" scope="page"/>
<body>
<center>
<h1>查看所有的商品类别</h1>
<table width=80% border="1" bgcolor="#0099CC"><tr bgcolor="#009966" bordercolor="#990066"><td>id</td><td>类别名</td><td>描述</td></tr>
<%

Collection categorys=category.getAllCategory();
Iterator it=categorys

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 13 in the jsp file: /viewCategory.jsp
Generated servlet error:
Category cannot be resolved to a type
找个英文好的把这些翻译了,我看不太懂,只了解一部分,意思是不能编译类,问题出在/viewCategory.jsp的第13行。Category不能被解释成一个类型。你检查一下com.hy828.ch12.ViewCategory和类Category有没有问题吧。