📄 upload_0002ejsp_jsp.java
字号:
import java.sql.*;
import com.xiaobai.bbsupload.BbsuploadBean;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
public class upload_0002ejsp_jsp extends HttpJspBase {
static {
}
public upload_0002ejsp_jsp( ) {
}
private static boolean _jspx_inited = false;
public final void _jspx_init() throws org.apache.jasper.runtime.JspException {
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
String _value = null;
try {
if (_jspx_inited == false) {
synchronized (this) {
if (_jspx_inited == false) {
_jspx_init();
_jspx_inited = true;
}
}
}
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=gb2312");
pageContext = _jspxFactory.getPageContext(this, request, response,
"error.jsp", true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
// HTML // begin [file="/upload.jsp";from=(0,109);to=(2,0)]
out.write("\r\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n");
// end
// HTML // begin [file="/upload.jsp";from=(2,56);to=(8,0)]
out.write("\r\n<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n<title>无标题文档</title>\r\n</head>\r\n");
// end
// begin [file="/upload.jsp";from=(8,2);to=(21,0)]
String[] files=null;
try{
BbsuploadBean upload=new BbsuploadBean(pageContext.getServletConfig(),request,response);
// upload.setUploadType("rar,zip");
upload.setUploaddir("uploadfiles");
upload.startUpload();
files=upload.saveUploadFile("xiaobai");
}catch(Exception ex){
String info=ex.getMessage();
response.sendRedirect("/error.jsp?errorinfo="+info+"!");
}
// end
// HTML // begin [file="/upload.jsp";from=(21,2);to=(23,0)]
out.write("\r\n<body>\r\n");
// end
// begin [file="/upload.jsp";from=(23,2);to=(26,2)]
for(int i=0;i<files.length;i++){
String name=files[i];
// end
// HTML // begin [file="/upload.jsp";from=(26,4);to=(27,4)]
out.write("\r\n\t 文件");
// end
// begin [file="/upload.jsp";from=(27,7);to=(27,8)]
out.print(i);
// end
// HTML // begin [file="/upload.jsp";from=(27,10);to=(27,36)]
out.write(":<a href=\"download?picdir=");
// end
// begin [file="/upload.jsp";from=(27,39);to=(27,43)]
out.print(name);
// end
// HTML // begin [file="/upload.jsp";from=(27,45);to=(27,55)]
out.write("&fileName=");
// end
// begin [file="/upload.jsp";from=(27,58);to=(27,62)]
out.print(name);
// end
// HTML // begin [file="/upload.jsp";from=(27,64);to=(27,66)]
out.write("\">");
// end
// begin [file="/upload.jsp";from=(27,69);to=(27,73)]
out.print(name);
// end
// HTML // begin [file="/upload.jsp";from=(27,75);to=(28,2)]
out.write("</a>\r\n\t ");
// end
// begin [file="/upload.jsp";from=(28,4);to=(30,0)]
}
// end
// HTML // begin [file="/upload.jsp";from=(30,2);to=(35,0)]
out.write("\r\n\r\n上传成功!\r\n</body>\r\n</html>\r\n");
// end
} catch (Throwable t) {
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -