• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

load a class in already running tomcat

 
Pradeep Negi
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to load a class which outside on tomcat environment (tomcat is already running).I have a class into different location which I have to load when my application is already running into tomcat. Can someone help me it's possible to load a class into already started tomcat and how?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could write your own custom classloader.

Maybe if you describe, in detail, what you're trying to do, we can suggest an easier alternative.
 
Pradeep Negi
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for replying,

My application runs in tomcat, once my application start I need to use classes which in a jar file and out of tomcat environment(mean not in a classpath ).Can you help me regarding this.

Do I need to change in server.xml (for security coz I will try to access load jar form out of tomcat environment)? If yes what will be these.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13048
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may find the "class-loader-howto.html" file that comes in a standard Tomcat installation under tomcat-docs to be helpful here.
Note that Tomcat pays no attention to the environment classpath.
The initialization params for your servlet can be used to point to the location of your class files so you should not have to modify server.xml but you will have to set security properties.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic