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
200 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
object methods vs static methods 2 100
method inner class 6 83
getting Http 404 error in jsp forms 8 81
java operators 3 120
Some of the SEO trends we might expect in 2017.
Giving access to ESXi shell console is always an issue for IT departments to other Teams, or Projects. We need to find a way so that teams can use ESXTOP for their POCs, or tests without giving them the access to ESXi host shell console with a root …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

809 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