Problem solve Get help with specific problems with your technologies, process and projects.

Default folder in WebSphere

I'm using VAJ and the IBM Websphere test Environment for testing. The system requires a property file to be loaded...

in when a servlet starts in order to resolve all system specific values. (i.e. IP addresses of machine, LDAP servers, etc). This allows for ease of portability when deploying onto various platforms. When I run the application via the Servlet Launcher, the class called to load in the properties file throws an exception indicating that the properties file can not be found. The class that loads the properties file does not have a hard codes path. (ie. The code just looks for .properties). I have located the default folder on our iSeries box, but I cannot located the default folder in the WebSphere test Environment. Do you know where the default directory is located or where to set the default directory location when testing programs in the WebSphere test environment of Visual Age for Java?

Don Yantzi, one of our VisualAge for Java developers, provided the following:

The "default" folder you are mentioning for the WebSphere Test Environment is the resource directory for the VisualAge for Java project which contains your servlet. For example, if your servlet are in a VisualAge for Java project called "Intranet Application" then you would put the .properties files in the directory <vajava install>ideproject_resourcesintranet application , where <vajava install> is the directory where VisualAge For Java is installed. If you are using WebSphere Development Tools for AS/400 this would be c:wdt400vajava by default.

Background information: You setup the CLASSPATH for the WebSphere test environment by specifying other VisualAge for Java projects that contain your servlets, JavaBeans, etc... In VisualAge for Java 3.02 this is done by setting the CLASSPATH for the Servlet Launcher class. In version 3.5 this is performed via the WebSphere Test Environment Control Center. Adding a VisualAge for Java project to the CLASSPATH automatically adds its associated project resources directory. The Java Virtual Machine (JVM) uses the CLASSPATH to locate .properties files.

This was last published in April 2001

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.