Package xxxx not found in import.
A common error I'm sure, but it has taken me hours to try and sort it out, to no avail.
Can anyone help with this error please?
1/ I placed file P6.jsp in directory webapps\lab06
2/ I placed file NameStore.class in directory webapps\Lab06\web-inf\classes\MyUtils
3/ Using Tomcat I opened my .jsp file in the browser using URL
4/ The P6.jsp file was found, but my class file NameStore.class in package MyUtils was not found. This was the error shown in my browser:-
----------------------------------------------------------------------------------------------
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
C:\jdk1.4\jakarta-tomcat-4.0.1\work\Standalone\localhost\lab06\P6$jsp.java:3: Package MyUtils not found in import.
import MyUtils.* ;
^
----------------------------------------------------------------------------------------------
My current directory set up is:-
webapps--lab06( contains P6.jsp)
|
|
|
|
|
|
--- web-inf
|
|
-----classes
|
|
|
------MyUtils (contains NameStore.class)
----------------------------------------------------------------------------------------------
My P6.jsp code starts with :-
<HTML>
<HEAD>
<TITLE>P6.jsp</TITLE>
</HEAD>
<BODY>
<%@page import="MyUtils.* ,java.util.*"%>
...
----------------------------------------------------------------------------------------------
The source file for my Namestore class, i.e NameStore.java
code starts with:-
package MyUtils;
import java.util.*;
public class NameStore {...
----------------------------------------------------------------------------------------------
thanks,
John Withington
A common error I'm sure, but it has taken me hours to try and sort it out, to no avail.
Can anyone help with this error please?
1/ I placed file P6.jsp in directory webapps\lab06
2/ I placed file NameStore.class in directory webapps\Lab06\web-inf\classes\MyUtils
3/ Using Tomcat I opened my .jsp file in the browser using URL
4/ The P6.jsp file was found, but my class file NameStore.class in package MyUtils was not found. This was the error shown in my browser:-
----------------------------------------------------------------------------------------------
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
C:\jdk1.4\jakarta-tomcat-4.0.1\work\Standalone\localhost\lab06\P6$jsp.java:3: Package MyUtils not found in import.
import MyUtils.* ;
^
----------------------------------------------------------------------------------------------
My current directory set up is:-
webapps--lab06( contains P6.jsp)
|
|
|
|
|
|
--- web-inf
|
|
-----classes
|
|
|
------MyUtils (contains NameStore.class)
----------------------------------------------------------------------------------------------
My P6.jsp code starts with :-
<HTML>
<HEAD>
<TITLE>P6.jsp</TITLE>
</HEAD>
<BODY>
<%@page import="MyUtils.* ,java.util.*"%>
...
----------------------------------------------------------------------------------------------
The source file for my Namestore class, i.e NameStore.java
code starts with:-
package MyUtils;
import java.util.*;
public class NameStore {...
----------------------------------------------------------------------------------------------
thanks,
John Withington