<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <%@ page contentType="text/html; charset=UTF-8"%> <%@ page import="java.util.*" %> <%@ page import="java.io.*" %> <%@ page import="com.csc.library.upload.UploadConfig" %> <HTML> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> <META http-equiv="Content-Style-Type" content="text/css"> <TITLE>TESTEXPORT.jsp</TITLE> </HEAD> <BODY> <% String cfg = application.getInitParameter("upload-config"); String uploadConfigPath = application.getRealPath( cfg ).replace('\\', '/').replace('/', File.separatorChar); StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); try { UploadConfig upload = new UploadConfig( uploadConfigPath ); upload.load(); //upload.getProperties().list(new PrintWriter(out)); out.println("<h3>Load Upload Config Success</h3><br />"); upload.getProperties().list(pw); out.println (sw.toString().replaceAll("\\n", "<br />")); } catch (Exception e) { out.println("<br/><br />Could not load upload-config :" +uploadConfigPath +"<br />"); out.println (sw.toString().replaceAll("\\n", "<br />")); } sw.close(); pw.close(); %> </BODY> </HTML>