This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi there, I am trying to import a bean class "FileListFilter", and I have put the FileListFilter.class in the WEB-INF/servlets and I am trying to import the bean using <%@ page import="FileListFilter"%> however, the compiler keeps complaining: com.sun.jsp.JspException: Compilation failed:work\%3A8080%2Fproject\index_jsp_1.java:17: Class FileListFilter not found in import. import FileListFilter; ^ 1 error Please help and Thanks so much!!!
It's not WEB-INF/servlets - you should be placing the file in WEB-INF/classes! With subdirectories matching the components of the package name if you defined the class as a member of a packed.
An IDE is no substitute for an Intelligent Developer.
Joined: Aug 27, 2001
I try to make the class a member of a package, and then import the entire package, actually I've put the class("FileListFilter") inside an existing example package("num"), it works fine when I import the package using <%@ page import="num.*"%>, however it fails when I try to call FileListFilter within the jsp!! And for placing the file in WEB-INF/classes, there's no directory as "classes" in JSWDK, does it mean that I have to add it by myself?? And in fact I try to add the directory "classes" under WEB-INF, and put my classes inside it.. but it still fails when I import the package by using <%@ page import="FileListFilter"%>. Thanks so much for your help!!!
Tomcat works fine on win98. There are a few tweaks that you may need to do regarding memory. But they've been asked and answered several times here at the ranch, so as soon as you get a certain error, just use Javaranch's search function and you'll find lots of help.
Not only is it the better product, the JSWDK hasn't been updated in a quite some time, so you are using an older version of both the servlet and JSP spec. Better to upgrade. [This message has been edited by Mike Curwen (edited September 18, 2001).]