I have a create a "test.properties" file. In test.properties file
mod.filename="module"
available. This properties file place in public_html directory in Java Web Server 2.0.
In a jsp file I am calling the above properties file using "ResourceBundle" this way.
try {
ResourceBundle rb=ResourceBundle.getBundle("test");
String str=rb.getString("mod.filename");
out.println(errorpath);
} catch (Exception e) {
System.out.println(e);
}
When I am running the above jsp file using Java Web Server 2.0 then giving the error "cannot found resource test".
What to do?
Please send the reply to sngolla at rediffmail dot com.
Thank You.
-
calling property variable in jsp (3 messages)
- Posted by: Sreemannarayana Golla
- Posted on: May 19 2001 07:59 EDT
Threaded Messages (3)
- calling property variable in jsp by Andy Nguyen on May 19 2001 09:59 EDT
- calling property variable in jsp by Sreemannarayana Golla on May 21 2001 08:35 EDT
- calling property variable in jsp by Race Condition on May 24 2001 12:37 EDT
-
calling property variable in jsp[ Go to top ]
- Posted by: Andy Nguyen
- Posted on: May 19 2001 09:59 EDT
- in response to Sreemannarayana Golla
Try putting test.properties in a directory that's in your classpath (any should work, system classpath, weblogic classpath, or webapp/servlet classpath).
Andy -
calling property variable in jsp[ Go to top ]
- Posted by: Sreemannarayana Golla
- Posted on: May 21 2001 08:35 EDT
- in response to Andy Nguyen
Hi. Mr/Mrs. Andy Nguyen ,
I followed your suggestion. But still it is not working. Kindly give the solution.
Thank You. -
calling property variable in jsp[ Go to top ]
- Posted by: Race Condition
- Posted on: May 24 2001 12:37 EDT
- in response to Sreemannarayana Golla
Why use seperate properties files? Instead, create a Java class that acts as a properties file. The JVM and a relational database are all that you need to run any project. Java projects are already complex enough. Why introduce a new place to keep important data? It sounds like the "public_html" directory is not the most secure place to keep valuable system parameters.