weblogic application file reading problem

ytgprasad
ytgprasad used Ask the Experts™
on
hi,
My application is deployed as a war file on the server and in one servlet I am reading files of the war file. At this point i am getting errors. File not found.
1) I tried get real path, this is giving null.
2) tried to hard code file name which is also not working
Can any one suggest me solution.
Thank you,
Prasad
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
>> 1) I tried get real path, this is giving null.

how did u try this?

vemul
never try to use FileInputStream( xxx.getResourcePath() ), this won't work use
ServletContext.getResourceAsStream()

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial