File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes BEA/Weblogic and the fly likes environment variable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "environment variable" Watch "environment variable" New topic
Author

environment variable

manish ahuja
Ranch Hand

Joined: Oct 23, 2003
Posts: 312
Hi there,

I am not sure this is right forum for the question.

I have a scenario wherein the web application deployed in Weblogic app server produces a pdf file and stores it on the file system. We want the location on the file system for this file to be configurable and not hard-coded as part of the code.

One option was to configure an environment variable in Weblogic and use the environment variable in the code something like jndi datasource name used for dynamically configured database connections.

I am looking at the Weblogic server but was not able to find an option to create such an environment variable within Weblogic whose name can be used within the code and value will be the pdf directory location.

Let me know.

Regards,
Deepak Pant
Ranch Hand

Joined: Feb 13, 2004
Posts: 443
1. Create a property file, which contains the location where you want PDF files to reside.

2. The property file will reside in the file system.

3. The location of the property file can be passed to WebLogic using -D option. For example; -DPropFile=/usr/local/bea/propertyFile.properties.

4. Another option would be to load the property file as the resource bundle. In this case you dont have to use -D option.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: environment variable