⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 up_0005fmodify_0005fmend_0002ejsp_jsp.java

📁 一个完整的门户网站,基于JSP环境下开发的,使用SQL数据库.
💻 JAVA
字号:
package admin;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
import java.io.File;
import com.jspsmart.upload.Request;
import com.bwm.model.Soft;
import com.bwm.core.*;

public class up_0005fmodify_0005fmend_0002ejsp_jsp extends HttpJspBase {


  private static java.util.Vector _jspx_includes;

  public java.util.List getIncludes() {
    return _jspx_includes;
  }

  public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    javax.servlet.jsp.PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;


    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html; charset=GBK");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      com.jspsmart.upload.SmartUpload up = null;
      synchronized (pageContext) {
        up = (com.jspsmart.upload.SmartUpload) pageContext.getAttribute("up", PageContext.PAGE_SCOPE);
        if (up == null){
          try {
            up = (com.jspsmart.upload.SmartUpload) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "com.jspsmart.upload.SmartUpload");
          } catch (ClassNotFoundException exc) {
            throw new InstantiationException(exc.getMessage());
          } catch (Exception exc) {
            throw new ServletException("Cannot create bean of class " + "com.jspsmart.upload.SmartUpload", exc);
          }
          pageContext.setAttribute("up", up, PageContext.PAGE_SCOPE);
        }
      }

if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;
session.removeAttribute("error");
int count=0;
up.initialize(pageContext);
try{up.upload();}catch(Exception e){}
Request uprequest=up.getRequest();
String action =uprequest.getParameter("action").toString();
if(action==null||"".equals(action)){
    return;
}else{
    File f=new File(application.getRealPath("/upload")+File.separatorChar+up.getFiles().getFile(0).getFileName());
    if(f.exists()){
        session.setAttribute("error","鏂囦欢宸茬粡瀛樺湪");
        response.sendRedirect("error.jsp");
    }else{
        try { count = up.save("upload"); } catch (Exception e) {}
        if(count==1){
            if(BasetableFactory.getInstance().CreateMend(uprequest,File.separatorChar+up.getFiles().getFile(0).getFileName())){
                response.sendRedirect("manage_mend.jsp");
            }else{
                session.setAttribute("error","杞

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -