【JSP开源代码栏目提醒】:网学会员鉴于大家对JSP开源代码十分关注,论文会员在此为大家搜集整理了“visit.jsp”一文,供大家参考学习
<%@ page contentType="text/html; charset=GB2312" %>
<%@ page import="java.io.*" %>
<html><head><title>visit.jsp</title></head><body>
<%!
File tempDir=null; //实例变量
public void jspInit(){
ServletContext application=getServletConfig().getServletContext();
tempDir=(File)application.getAttribute("javax.servlet.context.tempdir");
}
%>
工作目录为:<%=tempDir.getPath() %>
</body></html>