Hi All,
I have 2 projects -
1. ProjecttContent - {context path ---> /hardware/xl/abc/content}
|--------------WebContent
|-----------ODSFileContent
|---------------- content.xml
and ProjectWeb - {context path ---> /hardware/xl/abc}
|-------------- JavaSource
| -------------- package com.xl.abc.data
| ---------- ContentData.java
Now, in ContentData.java i need to get content.xml file to do further operation which is in ProjectContent project.
In ContentData.java ------
I am getting contextpath from request. which returns /hardware/xl/abc since this java file is in ProjectWeb.
As content.xml is in ProjectContent, so appended /content to context path which is returned from request in ContentData.
i.e. request.getContextPath(); returns /hardware/xl/abc
BufferedInputStream bufferedInputStream = new BufferedInputStream(new FileInputStream(request.getContextPath()+"/content.xml"));
[3/30/11 21:53:06:328 IST] 0000003e SystemErr R java.io.FileNotFoundException: \hardware\xl\abc\content\content.xml (The handle is invalid.)
[3/30/11 21:53:06:343 IST] 0000003e SystemErr R at java.io.FileInputStream.open(Native Method)
[3/30/11 21:53:06:343 IST] 0000003e SystemErr R at java.io.FileInputStream.<init>(FileInputStream.jav a:129)
Please let me know how to get access to content.xml which is in ProjectContent from ContentData.java in ProjectWeb
Thanks,
Chinnu