How to access logback.xml from external folder - tomcat6

I'm using logback API for logging in my project but requirement is there will be single logback.xml configuration file for two project and logback.xml should be access from outside of project.
I have placed logback.xml in my project class path and this is working fine. Can any body suggest me how can I access logging configuration file from external folder?

You might find section of the Logback FAQ helpful: Is it possible for multiple JEE applications to share the same configuration file but without stepping on each other's toes?
In short, you can use any configuration file you want (provided that your Java application can access it) using JoranConfigurator.doConfigure("/path/to/your/config/file.xml"). HTH!

Related

CakePHP v2.x - More then one set of config files

I have "inherited" legacy CakePHP application which should be now deployed to multiply clients. I have search through the documentation for the version 2.x, but I was unable to find the following:
How can I easily store the different Config files for different clients? The reason is simple, each client will have different database details, different email setup ...
Should I have a default folder and for the other make a duplicate folder named Config_another_client_name folder and inside have a copy of those files? Does anyone have a better idea?

How do I refresh resources folder of web application?

I'm developing a web application in which I want to insert users and be able to display files that they upload via a search option. I can get all of the logic that I need sorted and the files uploaded into the correct directory. However, if I insert a new user into the db, the web app cannot find their file in the directory until I restart the server.
How can I make it so that the resources directory of my web app automatically gets refreshed by the server? I'm developing in Java/JSP and using Tomcat as my server.
Thanks!!
I'm guessing you're putting the files into the src/main/resources folder, then it's being packaged into the artifact and then you access them as the classpath resources. Then the next portion of the resources is going to be available after the next packaging.
Instead you should access the Files via usual File System and Absolute or Relative paths.

reading weblogic.xml from a location external to war

I have deployed 2 web applications in oracle weblogic 11gR1. For both of these applications i wanted to configure weblogic.xml in an external location such as in domain home.
Is there any way this can be achieved or is it mandatory for weblogic.xml to be present in WEB-INF folder within the WAR file?
A Deployment Plan (plan.xml file) located outside the war could be used to modify values in weblogic.xml. See http://docs.oracle.com/cd/E11035_01/wls100/deployment/config.html

How to add multiple pages in Google App Engine?

I'm a beginner on GAE and I was wondering if it was possible to add another page to it so the home page would be
"example.appspot.com"
and the second would be
"example.appspot.com/test"
I've already tried looking for something that helps but the answers aren't what I'm looking for.
Of course it is possible to add more pages. The configuration for defining the URL matchers depends on the language runtime that you are using.
For Java:
The deployment descriptor is a file named web.xml. It resides in the
app's WAR under the WEB-INF/ directory.
https://developers.google.com/appengine/docs/java/config/webxml
For Python:
A Python app specifies runtime configuration, including versions and
URLs, in a file named app.yaml
https://developers.google.com/appengine/docs/python/config/appconfig#Python_app_yaml_About_app_yaml

Where to put Database file in Eclipse RCP application?

I want to access SQLite DB file in my ECLIPSE RCP application. Where i have to put it in my application?
And also at exporting a product how to define the path of Database file.
You can put the database file in your plugin and access it in the code by getting the plugin's Bundle. Look at the following article for examples on how to access a plugin's files: Getting Access To Files In Eclipse RCP

Resources