Tomcat doesn't import my java packages

Z

z

Hi, I have a question about Tomcat 4.x. I'm using JSP with some .java
libraries inside a package named "p". The *.java files are under directory
"./WEB-INF/classes/p/". All worked ok until I accidentally deleted WEB-INF
folder, so I created all that directories again to put everything like
before, but now it doesn't find the packages.

The .jsp files have this first line:
<%@ page import="p.*" %>

Is it a bug of Tomcat?
Did I deleted some hidden files or what?


Thx in advance




PD: this is the server output:
===============================================================
HTTP Status 500 -

type Exception report
message
description The server encountered an internal error () that prevented it
from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 1 in the jsp file: /index.jsp

Generated servlet error:
[javac] Compiling 1 source file

/var/lib/tomcat4/work/Standalone/localhost/p2095768/index_jsp.java:7:
package p does not exist
import p.*;
^
===============================================================
 
A

Andrea Desole

z said:
Hi, I have a question about Tomcat 4.x. I'm using JSP with some .java
libraries inside a package named "p". The *.java files are under directory

maybe you mean *.class

"./WEB-INF/classes/p/". All worked ok until I accidentally deleted WEB-INF
folder, so I created all that directories again to put everything like
before, but now it doesn't find the packages.

The .jsp files have this first line:
<%@ page import="p.*" %>

Is it a bug of Tomcat?

not that I know. if the classes are there and the web.xml is there there
should be no problem. Did you restart the server?
Also, maybe you should check that you don't need jar files in the lib
directory.
Did I deleted some hidden files or what?

no. There are no hidden files in WEB-INF
 
Z

z

yes i meant *.class :)

If there is no solution but restarting the server, ok, but i'll have to wait
some days cuz the server is not mine, and I'd prefer to continue working
right now.

On the other hand, what do u mean with that "web.xml" there?
Do I have to put any "web.xml" file in "./WEB-INF/classes/p/" ???
I don't have any file named like that.

Well, I suppose there's no solution if I dont have a root login...
 
A

Andrea Desole

z said:
yes i meant *.class :)

If there is no solution but restarting the server, ok, but i'll have to wait
some days cuz the server is not mine, and I'd prefer to continue working
right now.

I never had such a problem, but it might make sense to restart the
server. If you can't restart the server you should be able at least to
redeploy the application.
Also, I have the feeling you don't have a build script. Specially if you
don't have full control on your application server, it's a really good
idea, before you go on, to make one. In that way you won't have problems
like this one, and you can easily deploy your application without making
mistakes.

On the other hand, what do u mean with that "web.xml" there?
Do I have to put any "web.xml" file in "./WEB-INF/classes/p/" ???
I don't have any file named like that.

no, I meant one web.xml, in the WEB-INF. You said you deleted the
directory, so you deleted the web.xml too. And you didn't mention a new
one. From the error message you get I assume you do have a web.xml in
the WEB-INF directory, but you never know.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top