matchoperation.jsp
1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<%@ include file="/templetecheck/filecheck/CheckUserIsSysadmin.jsp" %>
<%@ page import="weaver.general.Util" %>
<%@ page import="java.util.*" %>
<%@ page import="weaver.templetecheck.RulePath" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ page import="weaver.security.file.FileType" %>
<HTML><HEAD></HEAD><body></body></HTML>
<%
RulePath rulePath = new RulePath();
String path = request.getParameter("path");
String ishtml = request.getParameter("ishtml");
String tabtype = request.getParameter("tabtype");
ArrayList<String> types = new ArrayList<String>();
types.add(".xml");
types.add(".jsp");
types.add(".js");
types.add(".html");
types.add(".css");
types.add(".properties");
types.add(".java");
if(!FileType.validateFileExt(path,types)) {
out.print("{\"status\":\"no\"}");
return;
}
rulePath.savePath(tabtype,path);
//0--流程模板 1--配置文件 2--web.xml 3.其他
if("3".equals(ishtml)) {
response.sendRedirect("matchrule.jsp?tabtype="+tabtype+"&ishtml="+ishtml);
} else if("0".equals(ishtml)) {
response.sendRedirect("matchruleHtml.jsp?tabtype="+tabtype+"&ishtml="+ishtml);
} else {
response.sendRedirect("matchruleConfig.jsp?tabtype="+tabtype+"&ishtml="+ishtml);
}
%>