• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

New Classloader for tomcat.

 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have certain xml config files (hibernate mapping files) for my application.I do not want to put those in classes folder of my webapp.I want a new folder named "config" under WEB-INF.How can I do that to include this folder in the classloaders path.I have gone through the delegation model of classloading followed by tomcat but could not get mcuh.

Thanks in advance.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64721
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why swim upstream? classes is the appropriate place for such files, and that's where everyone else will expect them to be.

Doing weird things that aren't customary is a good way to not only confuse any others that may have to look at your code, but it adds fragility to your app.

Do you have a good reason to go against the flow other than "I want to"?
[ November 11, 2006: Message edited by: Bear Bibeault ]
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No particular reason for this.I just wanted to put all my config files is a separate directory other than classes as to my best on knowledge , classes directory is meant for unjared classes.And I think that to have a extended webapp classloader with config folder is classpath would be a good learning.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64721
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rahul Bhattacharjee:
classes directory is meant for unjared classes.


It's meant for anything that needs to be in the classpath.
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear for your reply.But can a extended webapp classloader be plugged into the tomcat's infrastructure with a new config dir along with classes directory.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic