File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes BEA/Weblogic and the fly likes Where will WebLogic look for files by default? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Where will WebLogic look for files by default?" Watch "Where will WebLogic look for files by default?" New topic

Where will WebLogic look for files by default?

Vivek Chaitanya
Ranch Hand

Joined: Oct 19, 2007
Posts: 35

Hi All,

I have a web application deployed in WebLogic. In one of my java file, I tried to read PleaseNote.txt as following:

Now WebLogic is taking PleaseNote.txt from its domain directory.My question is:

[1] Why it is domain directory? Why not the directory where my java file which has the above line of code is in?

[2] Is there any configuration which I am not aware of , but did unknowingly, for WebLogic to look in its domain directory?

[3] What are the implications / side effects of using above line of code in production?

Any WeLogic experts, please respond.

Thank you.
manoj r patil
Ranch Hand

Joined: Jun 06, 2002
Posts: 181
I think regardless of appserver, it will look into its classpath to load that particular file.

love your job and not your company;
...because you never know when your company will stop loving you!
Deepak Bala

Joined: Feb 24, 2006
Posts: 6662

You dont have to be a weblogic expert to answer this question. I do hope that line of code does not exist in prod. The file's path is relative. Relative to what is always a question that has a dynamic answer. Use an absolute path instead.

SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
I agree. Here's the link:
subject: Where will WebLogic look for files by default?
It's not a secret anymore!