normally when we read a file in java, we use
new FileReader(new File(filename));
this is not possible in jsp. i found a method on the internet that uses
InputStream in = getClass().getResourceAsStream(filename);
but then that getclass() cannot be used on static method/class, so if i want to put it in a bean, how should i do it?
or is there another method to read a file via a bean?
thanks
new FileReader(new File(filename));
this is not possible in jsp. i found a method on the internet that uses
InputStream in = getClass().getResourceAsStream(filename);
but then that getclass() cannot be used on static method/class, so if i want to put it in a bean, how should i do it?
or is there another method to read a file via a bean?
thanks