importing classes into JSP page
843836Apr 6 2004 — edited Apr 13 2004Hi There,
I am new to this and here is my problem.
I am doing a shopping cart tutorial and trying to get a JSP page to import two classes :
<%@ page language="java" contentType="text/html"
import="ShoppingBasket,Product"
errorPage="errorpage.jsp" %>
I get :
C:\jakarta-tomcat-4.1.30\work\Standalone\localhost\_\shop_0002dbasket_jsp.java:7: '.' expected
import ShoppingBasket;
^
C:\jakarta-tomcat-4.1.30\work\Standalone\localhost\_\shop_0002dbasket_jsp.java:8: '.' expected
import Product;
^
C:\jakarta-tomcat-4.1.30\work\Standalone\localhost\_\shop_0002dbasket_jsp.java:50: cannot resolve symbol
symbol : class ShoppingBasket
location: class org.apache.jsp.shop_0002dbasket_jsp
ShoppingBasket basket = null;
The classes compile ok . I read that instead of comma seperating the classes it might be better to put them in a package but I do not know the correct syntax or where to put the package if this is correct.
The tutorial is from this book and the shopping cart source code is here.
http://www.ineasysteps.com/books/?1840781971
Any help appreciated
Jim Ascroft