• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Supply properties file as a plugin

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi friends, please try to understand the problem first before replying.
i had created a war file of my application on tomcat. Now there are many things which i want to change you can say for testing purpose or the requirement is like that, so i need to give one property file to it which should not be there in the war file. Can anybody help me in knowing how to do that. See the must contraint is that i dont want to change my war file once i created that. The property file or just say the configuration file should work as a external plugin kind of thing. One thing is that before building the war file i can give whatever path i want to, to access the file, but once war is created i dont want to touch it. i will make changes to the property file and it will / should reflect.
 
Karan
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok to addon one more constraint i am not using struts, i am using flex as my framework.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tomcat gives you two places where you can configure a context.
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

The first is server.xml but they're steering people away from using that.

The other is a context fragment file stored under TOMCAT_INSTALL/conf/Catalina/localhost.
There are already some there you can look at for a reference.

You can add context-init-params to your context entry.
This is a great place for you to set the path to your properties file.
 
reply
    Bookmark Topic Watch Topic
  • New Topic