Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to read files on server from a java program?

843840Oct 5 2009 — edited Oct 5 2009
Hello,

I am fairly new to JSP programming. I have an issue with reading files. I am trying to call method of a normal java file from a jsp program. The method I am trying to call does some IO operation on Files. I have the files in the same directory as my class files on server that is in WEB-INF/classes folder. In my java program, I am giving just the file name to open because the files and the classes are in the same directory. But this is not working.

What exactly should I do to read a file from a java program, that is running on the server?

Any help is appreciated.

Thanks,
Krishna
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 2 2009
Added on Oct 5 2009
6 comments
1,472 views