薛之谦北方姑娘:jsp中,请教 cannot find symbol:的错误

来源:百度文库 编辑:高考问答 时间:2024/05/12 10:01:05
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="javax.servlet.*" %>
<%@ page import="myPackage.*" %>
<%
Vector v=(Vector)session.getAttribute(Constants.NEWS_LIST_KEY);
news news1=null;
%>
<html>
<head>
。。。。。
后面不用写了,只有一个错误,就在"Vector v=。。。"这一行,
提示:cannot find symbol:symbol:variable Constants。
我是照书上打的,而且搞不懂Constants是什么

Constants是自定义常量类

class Constants{
public static final NEWS_LIST_KEY = "xxx";
}