import tt.item.*;如果你的item是一个类,应该不要import item,而不是import item.*;

解决方案 »

  1.   

    改成这样,
    <%@ page contentType="text/html;charset=gb2312" import="tt.item,tt.Cart"%>
    还是会报错呀!!!org.apache.jasper.JasperException: Unable to compile class for JSPAn error occurred at line: -1 in the jsp file: nullGenerated servlet error:
        [javac] Since fork is true, ignoring compiler setting.
        [javac] Compiling 1 source file
        [javac] Since fork is true, ignoring compiler setting.
        [javac] D:\tomcat\work\Catalina\localhost\_\org\apache\jsp\softshop\indexcontent_jsp.java:6: cannot access tt.item
        [javac] bad class file: D:\tomcat\webapps\ROOT\WEB-INF\classes\tt\item.class
        [javac] class file contains wrong class: item
        [javac] Please remove or make sure it appears in the correct subdirectory of the classpath.
        [javac] import tt.item;
        [javac]           ^
        [javac] 1 error
      

  2.   

    bean文件里面写没写~import item.*;~import Cart.*;
      

  3.   

    WEB-INF是被禁止访问的吧,只有BEAN才行
      

  4.   

    to  7758akuma(阿酷玛) 
    我没有用到usebean
      

  5.   

    在被包含页中不要再设置contentType;
    <%@page import="tt.*"%>
      

  6.   

    在被包含页中不要再设置contentType;
    <%@page import="tt.*"%>
    这样改了后,打开indexcontent.jsp时还是报错如下,可明明Cart类用
    javac命令编译没有问题的呀!!!!!!!!!!!!!!!各位,帮忙呀
    org.apache.jasper.JasperException: Unable to compile class for JSPAn error occurred at line: -1 in the jsp file: nullGenerated servlet error:
        [javac] Since fork is true, ignoring compiler setting.
        [javac] Compiling 1 source file
        [javac] Since fork is true, ignoring compiler setting.
        [javac] D:\tomcat\work\Catalina\localhost\_\org\apache\jsp\softshop\indexcontent_jsp.java:53: cannot access tt.Cart
        [javac] bad class file: D:\tomcat\webapps\ROOT\WEB-INF\classes\tt\Cart.class
        [javac] class file contains wrong class: Cart
        [javac] Please remove or make sure it appears in the correct subdirectory of the classpath.
        [javac] Cart ShopCart=(Cart)session.getAttribute("cart");
        [javac] ^
        [javac] 1 error
      

  7.   

    Cart和item都在一个包内吗?大小写对码
      

  8.   

    Cart,item大小写也对,也同在包tt内
      

  9.   

    类item,Cart放在tomcat\webapps\ROOT\WEB-INF\classes\tt
    目录下,编译没有任何问题.
    ---------------------------------------------------
    怀疑你的item,Cart两个类没有package tt;
    你检查一下