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

📄 addtourdb_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 addTourdb_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");
      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("        <\n");
      out.write("        DB.setConnection();\n");
      out.write("        String name=(request.getParameter(\"tourName\")).toUpperCase();  \n");
      out.write("        \n");
      out.write("        String type=\":\";\n");
      out.write("             String description=(request.getParameter(\"description\")).toUpperCase();\n");
      out.write("           String speciality=(request.getParameter(\"specialities\")).toUpperCase();\n");
      out.write("        \n");
      out.write("               String address=request.getParameter(\"address\");\n");
      out.write("               String country=request.getParameter(\"country\");\n");
      out.write("               String state=request.getParameter(\"state\");\n");
      out.write("               String city=request.getParameter(\"city\");\n");
      out.write("               String zipCode=request.getParameter(\"zipCode\");\n");
      out.write("               String emailId=request.getParameter(\"emailId\");\n");
      out.write("               String contactNo=request.getParameter(\"contactNo\");\n");
      out.write("               String latitude=request.getParameter(\"latitude\");\n");
      out.write("            String longitude=request.getParameter(\"longitude\");\n");
      out.write("               String query=\"select * from address\";\n");
      out.write("               int addressid=DB.setSelectCountQuery(query);\n");
      out.write("               addressid++;\n");
      out.write("               query=\"select * from tourlocation\";\n");
      out.write("               int tourid=DB.setSelectCountQuery(query);\n");
      out.write("               tourid++;\n");
      out.write("               query=\"insert into address values(\"+\"'\"+addressid+\"',\"+\"'\"+address+\"',\"+\"'\"+city+\"',\"+\"'\"+state+\"',\"+\"'\"+country+\"',\"+\"'\"+zipCode+\"',\"+\"'\"+emailId+\"',\"+\"'\"+contactNo+\"','\"+latitude+\"','\"+longitude+\"')\";\n");
      out.write("               DB.setQuery(query);\n");
      out.write("                query=\"insert into tourlocation values(\"+\"'\"+tourid+\"','\"+addressid+\"',\"+\"'\"+name+\"',\"+\"'\"+description+\"','\"+speciality+\"')\";\n");
      out.write("               DB.setQuery(query);\n");
      out.write("               DB.closeDB();\n");
      out.write("              \n");
      out.write("               %>\n");
      out.write("               ");
      if (true) {
        _jspx_page_context.forward("./addTourLocations.jsp");
        return;
      }
      out.write("\n");
      out.write("           </body>\n");
      out.write("</html>\n");
      out.write("\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 + -