Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat 5.0\shared\classes

 
K Aditi
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am using Tomcat 5.0 on Win XP and would like to load a class contained in Tomcat 5.0\shared\classes folder when the Tomcat starts.
For this I tried modifying setclasspath.bat by adding the path of shared folder in the script.But that did not solve the problem.
By the way, I start Tomcat through Eclipse-plugin as it does not start by executing startup.bat.
Thanks!
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eclipse uses an embedded version of Tomcat which isn't necessarily configured the same way as a standalone version.
I'm going to move this to our IDEs forum where Eclipse issues are discussed.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat doesn't simply load every class in the classpath on startup (no Java application does).

What is the mechanism you're trying to use to load the class?
 
K Aditi
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to load a .dll for a Web Application. As multiple Web Applications use the same library I put class which loads the library in $CATALINA_BASE/shared/classes folder...courtesy this.
Somehow it did not work.So I tried using the System ClassLoader to load the class.But this too did not work.
Thanks!
 
K Aditi
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any suggestions? I have accumulated a series of failed attempts.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, what exactly does "did not work" mean?
 
K Aditi
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for the tardiness, but I would like to rephrase my question.
Can I load a dll when Tomcat starts?This dll will be used by multiple Web Apps at the same time.
To be more specific, can the following class be loaded when the Tomcat starts?

Thanks.
[ July 14, 2008: Message edited by: K Aditi ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic