⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 07_03.jsp

📁 jsp数据库编程入门
💻 JSP
字号:
<html>
<head>
<title>新建文件或目录</title>
</head>
<%@ page contentType="text/html; charset=gb2312"%>
<%@ page import="java.io.File"%>
<jsp:useBean id="list" class="test.CatalogOperate" scope="session" />
<body>
<center><h2>
新建文件或目录
</h2></center>
<%
  String path = new String(request.getParameter("path").getBytes("iso8859-1"), "gb2312");
  String type = request.getParameter("type");
  String name = new String(request.getParameter("name").getBytes("iso8859-1"), "gb2312");
  if (type.equals("dir"))
  {
     if (list.newDir(name)==true)
     {%>
	建立目录成功!<br>	
<%   }else{%>
	建立目录失败!<br>	
<%   }
  }else if (type.equals("file"))
  {
      if (list.newFile(name)==true)
      {%>
	建立文件成功!<br>	
<%    }else{%>
	建立文件失败!<br>	
<%    }
  }%>
<a href=07_02.jsp?path=<%=path%>>返回</a><br>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -