当前位置: 技术问答>java相关
关于JSP的BEANS的问题。各位请进!
来源: 互联网 发布时间:2017-04-22
本文导语: A Servlet Exception Has Occurred org.apache.jasper.JasperException: Unable to compile class for JSP..worklocalhost__0002fparton_0002findex_0002ejspindex_jsp_0.java:11: Package xbook.common not found in import. xbook.common.*; ^ ..wor...
A Servlet Exception Has Occurred
org.apache.jasper.JasperException: Unable to compile class for JSP..worklocalhost__0002fparton_0002findex_0002ejspindex_jsp_0.java:11: Package xbook.common not found in import.
xbook.common.*;
^
..worklocalhost__0002fparton_0002findex_0002ejspindex_jsp_0.java:13: Package xbook.bookstore not found in import.
xbook.bookstore.*;;
^
..worklocalhost__0002fparton_0002findex_0002ejspindex_jsp_0.java:14: Class or interface declaration expected.
import javax.servlet.*;
^
..worklocalhost__0002fparton_0002findex_0002ejspindex_jsp_0.java:21: Superclass parton.HttpJspBase of class parton._0002fparton_0002findex_0002ejspindex_jsp_0 not found.
public class _0002fparton_0002findex_0002ejspindex_jsp_0 extends HttpJspBase {
^
4 errors
我的index.jsp的代码是:
xbook¹Ï®ÑqÁʺô
xbook¹Ï®ÑqÁʺô
±b¸¹
±K½X
org.apache.jasper.JasperException: Unable to compile class for JSP..worklocalhost__0002fparton_0002findex_0002ejspindex_jsp_0.java:11: Package xbook.common not found in import.
xbook.common.*;
^
..worklocalhost__0002fparton_0002findex_0002ejspindex_jsp_0.java:13: Package xbook.bookstore not found in import.
xbook.bookstore.*;;
^
..worklocalhost__0002fparton_0002findex_0002ejspindex_jsp_0.java:14: Class or interface declaration expected.
import javax.servlet.*;
^
..worklocalhost__0002fparton_0002findex_0002ejspindex_jsp_0.java:21: Superclass parton.HttpJspBase of class parton._0002fparton_0002findex_0002ejspindex_jsp_0 not found.
public class _0002fparton_0002findex_0002ejspindex_jsp_0 extends HttpJspBase {
^
4 errors
我的index.jsp的代码是:
xbook¹Ï®ÑqÁʺô
xbook¹Ï®ÑqÁʺô
±b¸¹
±K½X
¥[¤J·|û
我的BEANS的是放在d:TomcatwebappsROOTpartonWEB-INFclassesxbookcommon和d:TomcatwebappsROOTpartonWEB-INFclassesxbookbookstore.
index.jsp是放在ROOTparton下。可他说找不到BEANS。怎么办。各位老大!
(我的CLASSPATH设的没什么问题!已经检验过了!)
|
你看看examples里的例子是不是可以运行,可以得话把jsp和bean放到examples相关目录下试试,看看在那会不会报错
|
把这句:
import="java.sql.*,
java.io.*,
java.text.*,
java.util.*,
xbook.common.*,
xbook.bookstore.*;"
改成import="java.sql.*,java.io.*,java.text.*,java.util.*,xbook.common.*, xbook.bookstore.*"试一下;
再试去掉这句的
import="java.sql.*,
java.io.*,
java.text.*,
java.util.*,
xbook.common.*,
xbook.bookstore.*;"
改成import="java.sql.*,java.io.*,java.text.*,java.util.*,xbook.common.*, xbook.bookstore.*"试一下;
再试去掉这句的