Tomcat can find my own Web-inf/classes/... java class files under Windows, but not under Linux
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, May 8, 2002 03:58 AM

I have one JSP application. But I've encountered different behaviours when using Tomcat on Windows and Linux for that same application: My Windows Platform: OS: Windows-2000 server jsdk: 1.3.1.01 Tomcat: 4.0.1 Environmental variable "CLASSPATH": c:jakarta-tomcat-4.0.1classes My Linux Platform: OS: RedHat 7.2 jsdk: j2sdk1.4.0 Tomcat: 4.0.3 Environmental variable "CLASSPATH" when logged in as root: /usr/java/j2sdk1.4.0/lib/tools.jar:/usr/local/jakarta-tomcat-4.0.3/classes:. Now, my problem: I have built my application exactly the same way in bo   More>>

I have one JSP application. But I've encountered different behaviours when using Tomcat on Windows and Linux for that same application:



My Windows Platform:
OS: Windows-2000 server

jsdk: 1.3.1.01

Tomcat: 4.0.1

Environmental variable "CLASSPATH":
c:jakarta-tomcat-4.0.1classes



My Linux Platform:
OS: RedHat 7.2

jsdk: j2sdk1.4.0

Tomcat: 4.0.3

Environmental variable "CLASSPATH" when logged in as root:
/usr/java/j2sdk1.4.0/lib/tools.jar:/usr/local/jakarta-tomcat-4.0.3/classes:.



Now, my problem:



I have built my application exactly the same way in both platforms. In both cases, I have my "context" (my application) residing outside Tomcat's webapps's directory (I put it somewhere like /usr/local/MyApp for Linux & e:... for Windows, nothing to do with Tomcat's directory). Both of them include the normal Web-inf/classes sub-directory structures. I tried to set up a "mypkg" directory under Web-inf/classes in both cases, and put my class file MyClass.java (in java source form) there.



However, with the same directive 'import="mypkg.*"' written at the top, my JSP files behave differently in the 2 platforms: When requested by a browser, the Windows platform worked fine (its "MyClass.java" class got compiled properly and the JSPs worked), but the Linux platform always generated the following:




Generated servlet error:
/usr/local/jakarta-tomcat-4.0.3/work/...: Class mypkg.MyClass not found.




And my "MyClass.java" file is NOT compiled. Why? Is it a bug of 4.0.3 or is it a strengthened requirement compared to 4.0.1? Thanks.

   <<Less

Re: Tomcat can find my own Web-inf/classes/... java class files under Windows, but not under Linux

Posted By:   chris_matthews  
Posted On:   Monday, May 13, 2002 11:40 PM

I would be very interested to know the answer, as i have been
trying to get my javabeans to work on linux (haven't tried windoze)
And the same tihng happens to me. My files don't get compiled properly
and I am having problems with packages aswell.

Thanks for posting as I have spent the last month trying to get things
right and I just thought I was stupid (which of course I could still be !),
but it is nice to hear someone with the same problem.

About | Sitemap | Contact