creating xml


Can you help me with something?

I am using grids, i am trying to make a web application. I am initializing my grids with the use of xml, i have a java programming writing to an xml file.

my problem is that i dont know how to get the relative path of my java program so that i would have basis where to put my xml file. specifically i have this java program who writes in the xml, i want to know where that java program is, so that when i create a file (xml) for writing, i know where to put it. Example my file is in C:…web_app\java_prog and want to put my file in C:…web_app\xml folder, how do i do this in java?

I wanted to get relative path because if i use absolute path which is C:…web_app\xml it will not work anymore if i deploy it to a server which has a different folder structure.


The problem is not directly related to component, you will need to store XML file somewhere inside web accessible folder, so you can use path related to html page on both server and client sides instead of hardcoded paths

>>that java program is, so that when i create a file (xml) for writing
Actually you can use java as direct source of xml
where xml.jsp - script which will connect to DB and output data as XML stream