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

📄 addinstitutiondb_jsp.java

📁 This is a project used to find a corresondin location from place
💻 JAVA
字号:
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;

public final class addInstitutiondb_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();

  private static java.util.Vector _jspx_dependants;

  private org.apache.jasper.runtime.ResourceInjector _jspx_resourceInjector;

  public Object getDependants() {
    return _jspx_dependants;
  }

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

    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;


    try {
      response.setContentType("text/html;charset=UTF-8");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;
      _jspx_resourceInjector = (org.apache.jasper.runtime.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector");

      out.write('\n');
      out.write('\n');
      Beans.Connect DB = null;
      synchronized (_jspx_page_context) {
        DB = (Beans.Connect) _jspx_page_context.getAttribute("DB", PageContext.PAGE_SCOPE);
        if (DB == null){
          DB = new Beans.Connect();
          _jspx_page_context.setAttribute("DB", DB, PageContext.PAGE_SCOPE);
        }
      }
      out.write(" \n");
      out.write("\n");
      out.write("\n");
      out.write("<html>\n");
      out.write("    <head>\n");
      out.write("        <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n");
      out.write("        <title>JSP Page</title>\n");
      out.write("    </head>\n");
      out.write("    <body>\n");
      out.write("        ");
        try{        DB.setConnection();        String name=(request.getParameter("institutionName")).toUpperCase();          String affliation=(request.getParameter("affiliation")).toUpperCase();        String code=(request.getParameter("code")).toUpperCase();        String courses=":";             String btech=request.getParameter("be");           String mtech=request.getParameter("me");          String mca=request.getParameter("mca");          String mba=request.getParameter("mba");          String bba=request.getParameter("bba");           String bhm=request.getParameter("bhm");            String mbbs=request.getParameter("mbbs");             String llb=request.getParameter("llb");              String bscnursing=request.getParameter("bscnursing");               String bpharm=request.getParameter("bpharm");                String mta=request.getParameter("mta");                                 if(btech!=null)            {            courses+=btech+":";            }                   if(mtech!=null)            {            courses+=mtech+":";            }                   if(mca!=null)            {            courses+=mca+":";            }                   if(mba!=null)            {            courses+=mba+":";            }                   if(bba!=null)            {            courses+=bba+":";            }                   if(bhm!=null)            {            courses+=bhm+":";            }                   if(mbbs!=null)            {            courses+=mbbs+":";            }                   if(llb!=null)            {            courses+=llb+":";            }                   if(bscnursing!=null)            {            courses+=btech+":";            }                   if(mta!=null)            {            courses+=mta+":";            }                   if(bpharm!=null)            {            courses+=bpharm+":";            }                courses.toUpperCase();                String facilities=(request.getParameter("facilities")).toUpperCase();               String address=(request.getParameter("address")).toUpperCase();               String country=(request.getParameter("country")).toUpperCase();               String state=(request.getParameter("state")).toUpperCase();               String city=(request.getParameter("city")).toUpperCase();               String zipCode=request.getParameter("zipCode");               String emailId=request.getParameter("emailId");               String contactNo=request.getParameter("contactNo");               String latitude=request.getParameter("latitude");               String longitude=request.getParameter("longitude");               String query="select * from address";               int addressid=DB.setSelectCountQuery(query,"address");                              query="select * from institution";               int instid=DB.setSelectCountQuery(query,"institution");                              query="insert into address values("+"'"+addressid+"',"+"'"+address+"',"+"'"+city+"',"+"'"+state+"',"+"'"+country+"',"+"'"+zipCode+"',"+"'"+emailId+"',"+"'"+contactNo+"','"+latitude+"','"+longitude+"')";               DB.setQuery(query);                query="insert into institution values("+"'"+instid+"','"+addressid+"',"+"'"+name+"',"+"'"+code+"',"+"'"+affliation+"',"+"'"+courses+"','"+facilities+"')";               DB.setQuery(query);               DB.closeDB();              }catch(Exception e)                      {                      e.printStackTrace();                      }                      
      out.write("\n");
      out.write("               ");
      if (true) {
        _jspx_page_context.forward("./addInstitution.jsp");
        return;
      }
      out.write("\n");
      out.write("           </body>\n");
      out.write("</html>\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}

⌨️ 快捷键说明

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