Understanding of the Web project execution process, including 1 HTTP URL 2 html, servlet, JSP 3 Tomcat and so on. The entire execution of the Web project, starting with an HTTP request such as Http://localhost:8080/test/login.action:
1 There are
In the project, sometimes needs the user to select the city, but the city is too many, the user chooses is not very convenient, therefore provides a user can enter the city's Chinese character or the pinyin abbreviation through the input box. The
Nginx's profile uses a miniature programming language, and many real-world nginx configuration files are a small program. Of course, the "Turing complete" aside, at least as far as I've observed, is designed to be influenced by both the Perl and
II: Response.sendredirect (Request.getcontextpath () + "/welcome.jsp"); //response.sendredirect () and Request.getrequestdispatcher (). Forward () can all jump, and there are some differences, One point is that the sendredirect () must be
Difference between getRequestDispatcher () and sendRedirect ()
1. request. getRequestDispatcher () is request forwarding, and a request is shared between the front and back pages;Response. sendRedirect () is a redirection, and the front and back
1. Request. getrequestdispatcher () is request forwarding, and a request is shared between the front and back pages;Response. sendredirect () is a redirection, and the front and back pages are not a request.
Request. getrequestdispather (); A
1. Request. getrequestdispatcher () is request forwarding, and a request is shared between the front and back pages;Response. sendredirect () is a redirection, and the front and back pages are not a request.
Request. getrequestdispather (); A
You can use the Sendredirect () method of the HttpServletResponse object if you simply want to implement a simple page jump and do not need to pass the request object.
Eg:response.sendRedirect ("web address");
If you want to implement a page jump
Difference between getRequestDispatcher () and sendRedirect (), getrequestdispatcher
1. request. getRequestDispatcher () is request forwarding, and a request is shared between the front and back pages;
Response. sendRedirect () is a redirection, and
Response.sendredirect (URL)--redirect to the specified URLRequest.getrequestdispatcher (URL). Forward (Request,response)--Request forwarding to the specified URL
1: The two differences:
Response.sendredirect (URL) jumps to the specified URL address,
Response in JSP. sendredirect () and request. getrequestdispatcher (). both the forward (request, response) objects can redirect pages, but there is a big difference between the two objects. In terms of separation, there are the following
1. request. getrequestdispatcher () is request forwarding, and a request is shared between the front and back pages; response. sendredirect () is a redirection, and the front and back pages are not a request. request. getrequestdispather (); returns
The second part left a question, is the meaning of reloadable= "true" configured in Server.xml?In the MyEclipse for a class save is compiled, do not have to be compiled, after compilation requires the server restart, that is, the meaning of
Paths in Java Web projects, with relative and absolute pathsWhat is a relative path? A simple exampleWe have Project test post address http://localhost:8080/test/Page qiantai/login.jsp page link The final address of the relative addressing link of
1.request.getrequestdispatcher () is the request forwarding, the front and back page share a request;Response.sendredirect () is redirected, and the front and back pages are not a request.Request.getrequestdispather (); Returns a RequestDispatcher
The default encoding of many files is ISO-8859-1, while the default encoding of the Chinese operating system is gb18030, the project code established in this workspace is gb18030. our commonly used encoding is UTF-8, this provides better
Response in JSP. sendredirect () and request. getrequestdispatcher (). both of the Forward (request, response) objects can redirect pages, but there is a big difference between the two objects. In terms of the split, there are the following points: ①
In (a) we mentioned that the value of the Nginx variable has only one type, that is, the string, but the variable may not have a meaningful value at all. A variable that has no value also has two special values: one is "illegal" (invalid) and the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.