📄 view_source.jsp
字号:
<%@ page import='com.caucho.vfs.*, java.io.*' %><% /* * view_source.jsp just writes the verbatim source to the browser. */// Chroot to the current directory so no one can use this as a p// security holdPath chroot = Pwd.lookupNative(request.getRealPath(".")).createRoot();Path path = chroot.lookupNative(request.getQueryString());if (path.isDirectory()) { throw new IOException("file " + request.getQueryString() + " is a directory");}ReadStream is = path.openRead();int ch;out.println("<body bgcolor=white>");out.println("<pre>");while ((ch = is.read()) >= 0) { if (ch == '<') out.print("<"); else out.print((char) ch);}is.close();out.println("</pre>");out.println("</body>");%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -