<% String realPath = request.getRealPath(request.getParameter("file")); if (realPath == null) //some web servers have bugs and real path must be obtained as follows realPath = request.getRealPath(request.getContextPath() + request.getParameter("file")); %> <html> <body topmargin="0" leftmargin="5" rightmargin="0" marginwidth="5" marginheight="0"> <p style="margin-bottom:5px"><font size="4" face="Verdana"><b><%=realPath%></b></font></p> <a href="javascript:history.go(-1);"><font size="2" face="Verdana">Back to Chart Graphics</font></a> <xmp><% java.io.FileReader input = new java.io.FileReader(realPath); int c; while ((c = input.read()) != -1) out.write((char)c); input.close(); %></xmp> </body> </html>