最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。
In many cases, you need to pass some information, from the browser to the Web server, and eventually to the daemon. Browsers can pass this informationto the Web server in two ways: the GET method and the POST method. The GET method sends encoded user information to the page request. Between the page and the encoded information? Characters are separated as follows: The GET method, which is the default way to pass information from the browser to the Web server, produces a long string that appears in the browser’s address bar. Do not use the GET method if you are passing passwords or other sensitive information to the server. The GET method has asize limit: there is a maximum of 1024 characters in the request string. This information is used Another reliable way to pass information to a daemon is the POST method. ThePOST method packages the information in the same way as the GET method, butdoesn’t the POST method treat the information as a URL? The text string after the character is sent, but the information is sent as a separate message. Messages are sent to the daemon as standard output, which you can parse and use. Servlet usage Servlet handles form data, which is automatically parsed using different methods depending on the situation: Here is a simple URL that uses the GET method to pass two values to the HelloForm program. Http://localhost:8080/TomcatTest/HelloForm?name= Rookie course & url=www.runoob.com The following is the processing of input by the Web browser And then we’re 2.6.1. GET method ¶
http://www.test.com/hello?key1=value1&key2=value2
QUERY_STRING header pass, and can be passed through QUERY_STRING environment variable access, Servlet uses doGet() method to handle this type of request. 2.6.2. POST method ¶
doPost() method to handle this type of request. 2.6.3. Use Servlet to read form data ¶
getParameter() can call request.getParameter() method to get the value of the form parameter. getParameterValues() if the parameter appears more than once, the methodis called and multiple values are returned, such as a check box getParameterNames() call this method if you want to get a complete list of all the parameters in the current request. 2.6.4. An example of the GET method using URL ¶
HelloForm.java Servlet program. We will use the getParameter() method, you can easily access the passed information:package com.runoob.test; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * Servlet implementation class HelloForm */ @WebServlet("/HelloForm") public class HelloForm extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public HelloForm() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // Set response content type response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); String title = "Using the GET method to read form data"; // Processing Chinese String name =new String(request.getParameter("name").getBytes("ISO-8859-1"),"UTF-8"); String docType = " \n"; out.println(docType + "\n" + "
\"center\">" + title + "\n" + "
\n" + "
web.xml create the following entries in the file: