Declared Package Mismatch
Posted on 2004-09-20
I have a jsp calling some java classes, and am having problems with the package import and declaration statements. I'm using Tomcat and developing with Eclipse. Here's my directory structure...
SubscriptionControlService <-- project directory
---src/classes/java <--- Source java files here
---SCS <-- html,jsp files at this level (This is my webroot)
---SCS/WEB-INF/classes/java <-- compiled class files automatically placed here
I am having two reported problems - one in my .java file and one in my .jsp file, but suspect they are reflections of the same problem.
Here's the package statement at the top of the java file...
The error reported is... "the declared package does not match the expected package."
The imports at top of INDEX.jsp are...
<%@ page import="classes.java.*" %>
<%@ page import="java.util.ArrayList,java.util.Iterator,java.util.List,java.lang.*" %>
The reported error for the first import is... "The import classes cannot be resolved"
Can someone explain why I'm getting these errors?