aspose file tools*
The moose likes Tomcat and the fly likes New Classloader for tomcat. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "New Classloader for tomcat." Watch "New Classloader for tomcat." New topic
Author

New Classloader for tomcat.

Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
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.


Rahul Bhattacharjee
LinkedIn - Blog
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61787
    
  67

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 ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
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

Joined: Jan 10, 2002
Posts: 61787
    
  67

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

Joined: Nov 29, 2005
Posts: 2308
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.
 
 
subject: New Classloader for tomcat.