aspose file tools*
The moose likes Websphere and the fly likes Unable to load static members while testing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Unable to load static members while testing" Watch "Unable to load static members while testing" New topic
Author

Unable to load static members while testing

Veena Grandhi
Greenhorn

Joined: Mar 13, 2008
Posts: 9
Hi,

We are migrating an old application running on a webserver to WAS.environment.dat file is having all the mappings like JDBC_CLASS,JDBC_DB etc static members.Now i have deployed the war file of the application in WAS and if i am testing it is failing to identify the static members.
I have restared the server still it is not able to identify.
Please suggest me if any one has some inputs ASAP?

Regards,
Praveena
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
What do you mean by "failing to identify the static members"? Do you mean that you have .html, .jpg, and other static files that your web application is not finding?


Merrill
Consultant, Sima Solutions
Veena Grandhi
Greenhorn

Joined: Mar 13, 2008
Posts: 9
Hi,
Let me give a clear picture.

I am having a war file with th below structure.
ADTREPORT---config
html
WEB-INF---classes
lib
web.xml

I have environment.dat file under config folder.I am trying to load that file by giving the relative path like "config/environment.dat".But it failing to to identify giving exception no such file or directory.

I tried with ./config/environment.dat
../cinfig/environment.dat
/config/environment.dat

But none of the above options are not working.

Appreciate your help ASAP.

Regards,
Veena
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The root directory of a war file is always considered to be the root of the web context directory of the web application. Given the way you are trying to access your files, I'd recommend you just remove the directory ADTREPORT and place all its files and folders directly in the root of the war file.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Unable to load static members while testing