on 02-23-2009 8:14 PM
I Need to read a xml from a web dynpro, then I execute
File file = new File("file.xml"), but a java.io.FileNotFoundException was throwed
I try with "/file.xml" but nothing...
Where I need to put the file? How can I do for read it?
Thank you
Hi,
You need to use the FileUpload UI element. Check [this|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/4739] [original link is broken] [original link is broken] [original link is broken]; blog.
Regards,
Satyajit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In that case, put the xml file under "src/mimes/Components/<path to your component>". So if the file is called "NewFile.xml" the code would look like:
try {
String xmlUrl = WDURLGenerator.getResourcePath(wdComponentAPI.getComponent().getDeployableObjectPart(),
"NewFile.xml");
if(xmlUrl != null){
Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new File(xmlUrl));
}
Regards,
Satyajit
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.