Solved

Does Tomcat 3 get confused when there are two classes of diff version, but of same name in the class path?

Posted on 2003-12-11
7
197 Views
Last Modified: 2011-09-20
Hi experts,

We are using tomcat 3 on our server, where multiple applicatons are running. Each application has its own folder under Tomcat, each folder has its own WEB-INF directory where we put our class file. Somehow, there are two application using the same classes, but different version, which means the class names are the same, but the codes are different.

Strangely, the one application which was installed on the machine earlier than the other seems "over power" the other that the newly installed application only sees the class version on the other directory, but not the one on its own WEB-INF directory. How to fix this and why?

Thanks.
0
Comment
Question by:cindyli
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 14

Expert Comment

by:kennethxu
ID: 9925299
0
 

Author Comment

by:cindyli
ID: 9925480
thanks. I have seen this document, which talks about Tomcat 4, not Tomcat 3 though.
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 9925507
as I was suggesting you to update to tomcat 4. a better version.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 9

Expert Comment

by:vzilka
ID: 9930034
Are you sure the class doesn't exist in the lib directory of Tomcat?
How did you change the Tomcat classpath?
0
 

Author Comment

by:cindyli
ID: 9932355

My understanding is you don't set classpath for Tomcat, it looks for certain directory itself. Yes, the classes do not exist in lib, but just under WEB-INF of each application.
0
 
LVL 9

Expert Comment

by:vzilka
ID: 9936929
You set the classpath before starting the server.
I assume you put the class files under WEB-INF\classes folder.
0
 
LVL 6

Accepted Solution

by:
jarasa earned 40 total points
ID: 10001534
Tomcat as many servers caches classes so it doesn't have to load them in memory everytime they are used, if the problem is with a packege you made you should consider changin the package name, you can use garbage collector but if the applications are being used at the same time, is hard to tell if the class will be dropped, if the class is from a comercial package you should just update the old one. It should work with the new one.
Javier
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many Password Managers (PM) out there to choose from. PM's can help with your password habits and routines, but they should not be a crutch you rely on too heavily. I also have an article for company/enterprise PM's.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now