| Author |
problem with getRealPath
|
Janardhan Mudduluru
Greenhorn
Joined: Jul 09, 2009
Posts: 4
|
|
Hi
I am using getRealPath in my application which is deployed in application server as war file.
getRealPath is returning null,So i am trying to use getResource here in lieu of getRealPath.
suggest me whether it is a correct approach or not?
and also is there any method to convert URL to String type.
Need Urgently.....
your Response will be much appreciated.
Thanks in advance.
Varma
|
 |
Deepak Bala
Bartender
Joined: Feb 24, 2006
Posts: 6588
|
|
The javadoc has a hint for your problem.
Let us know what you are trying to do. That will help us answer your question better
|
SCJP 6 articles - SCJP 5/6 mock exams - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
|
 |
bhaskarvignesh chandra sekaran
Greenhorn
Joined: Jun 27, 2009
Posts: 17
|
|
Try this piece of code
request.getContextPath()+"/xxx/public_html/ YOUR CONTEXT DIR HERE");
|
SCJP, SCWCD,preparing for SCDJWS
View my facebook profile
http://www.facebook.com/bhaskarvignesh
|
 |
Janardhan Mudduluru
Greenhorn
Joined: Jul 09, 2009
Posts: 4
|
|
Thanks Deepak and chandra for your quick responses....
i have solved this issue by removing getRealPath from my code.....in lieu i did use getResourceAsStream method directly without invoving getRealPath mehtod in between.
I am using this code in FrameWorkManager plugin provided by struts.
Thanks again
yours Janardhan.
|
 |
 |
|
|
subject: problem with getRealPath
|
|
|