Hi,
I would like to include the content of a file inside an JSP page. Usually, I would use something like:
<jsp:include page="<%= path_to_file %>" />
However, this will not work here since the file I am trying to include is outside the web deployment.
The ugliest solution I've seen is something like this:
<td>
<% BufferedReader br = new BufferedReader(new FileReader(new File(path_to_file)));
String line = br.readLine();
while (line != null) { %>
<% out.println(line); %>
<% line = br.readLine(); } %>
</td>
<% } catch (IOException e) { %>
<td>
<%= e %>
</td>
<% } %>
But I really don't want to do this.
Thanks