_ ______ _
| | | ____| | |
| |___ _ __ | |__ _ __ ___ ___ _ _ _ __ | |_ ___ _ __
_ | / __| '_ \| __| | '_ \ / __/ _ \| | | | '_ \| __/ _ \ '__|
| |__| \__ \ |_) | |____| | | | (_| (_) | |_| | | | | || __/ |
\____/|___/ .__/|______|_| |_|\___\___/ \__,_|_| |_|\__\___|_|
| |
|_|
usage: java -jar JspEncounter.jar
-c,--config <arg> xlsx config file
-cdata,--cdata <arg> cdata cap: -1, 10 ...
-charset,--charset <arg> charset name: utf-8, utf-16be ...
-e,--encode <arg> encode mode's encoding: charset, cdata,
entity
-entity,--entity <arg> entity type: 10, 16, 13 ...
-help usage help
-m,--mode <arg> jspfile or encode
-o,--output <arg> output file: default result.jsp/result.txt
-removeBom,--removeBom <arg> removeBom : default true
-s,--source <arg> source file
demo:
java "-Dfile.encoding=utf-8" -jar JspEncounter.jar -m jsp -c matrix.xlsx -s source.jsp -o result.jsp
java -jar JspEncounter.jar -m encode --encode charset --charset utf-16be -s source.txt -o result.txt
"C:\Program Files\Java\jdk1.8.0_191\bin\java.exe" "-Dfile.encoding=utf-8" -jar JspEncounter.jar -m jsp -c matrix.xlsx -s source.jsp -o result.jsp
原始jsp文件要求使用 <%@page ... >%>
、 <%! ..%>
、 <% %>
三种标签,且每种标签可出现多次,但顺序需要固定为这里列出的顺序。
--mode encode
--encode cdata
--cdata -1,10
--encode charset
--charset utf-16be ...
--removeBom Default: true
--encode entity
--entity 10 16 13
"C:\Program Files\Java\jdk1.8.0_191\bin\java" -jar JspEncounter.jar -m encode --encode charset --charset utf-16be -s source.txt -o result.txt