I navigate from struts to dbforms in my application.
So, I need to dynamically set the path for certain things (like image,followup,etc.) in the dbforms.
It is difficult for me to refer the images when I'm in "../servlet/control".
Should I write the root path in properties file and get it in the jsp & JS files? If so, how could I do this?
Is there any other better way to do this?
Thanx in advance.
regards,
vinoth.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I use struts and dbforms in my application.
I navigate from struts to dbforms in my application.
So, I need to dynamically set the path for certain things (like image,followup,etc.) in the dbforms.
It is difficult for me to refer the images when I'm in "../servlet/control".
Should I write the root path in properties file and get it in the jsp & JS files? If so, how could I do this?
Is there any other better way to do this?
Thanx in advance.
regards,
vinoth.
Could you repost this into the mailing list?
Thanks
Henner
I use these
in the main or init routine:
String appHome = System.getProperty("user.dir");
System.setProperty("application.home", appHome);
System.setProperty("application.images", appHome
+ System.getProperty("file.separator") + "com"
+ System.getProperty("file.separator") + "images");
then when I want to access images
String image1= System.getProperty("application.images") + System.getProperty("file.separator") + "myimage.gif"