<%
// HttpServlet 中取得 /WEB-INF/web.xml
// URL url = getServletContext().getResource("/WEB-INF/web.xml");
// JSP 中取得 /WEB-INF/web.xml
URL url = session.getServletContext().getResource("/WEB-INF/web.xml");
InputStream inputStream = url.openStream();
try {
// read from inputStream
BufferedReader br = new BufferedReader(new InputStreamReader(inputStream));
String line = br.readLine();
while(line != null) {
out.println(line.replaceAll("<","<").replaceAll(">",">"));
line = br.readLine();
}
} finally {
inputStream.close();
}
%>
沒有留言:
張貼留言