Alibabacloud.com offers a wide variety of articles about head first servlets and jsp pdf, easily find your head first servlets and jsp pdf information here online.
shown below (click to view larger image):Click on the network, you can observe a header named Loction, the content is exactly the URL we redirect, then if the servlet code is changed to "Resp.setheader (" Location "," http://www.cnblogs.com/xkxf/"); Can I implement redirection? The answer is no, but add the words "resp.setstatus (302);" It is possible to achieve this effect.7. Finally, what does Sendredirect ("another URL") mean? The explanation in the book is that you want the browser to proce
-class>Com.example.web.JarDownloadServlet-class> servlet> servlet-mapping> Servlet-name>TestServlet-name> Url-pattern>/jardownload.doUrl-pattern> servlet-mapping>Web-app>4. Prepare a test jar package and place it in D:\APACHE-TOMCAT-7.0.77\WEBAPPS\JARDOWNLOAD-V15. Write a servlet with full name com.example.web.JarDownload, compile it into a. class file and deploy to D:\apache-tomcat-7.0.77\webapps\JarDownload-v1\ Web-inf\classes\com\example\web PackageCom.example.web;Impor
).
What are the implied objects (Implicity object) in the JSP page? What are their respective types and functions?
Request--
Reponse--
Session--
Application--
Out--
Page--
PageContext--
Exception-valid only if the current JSP page is the error page.
Config--
What is the difference between the
servlets/
First of all, spit groove yourself, old remember the wrong spelling of the word servlets ~ ~ ~At head first Servlets jsp, I felt the fascination of head first (multi-image, one-page-less, this is head).What did the 1.WEB server do
use the XML Deployment profile (DD) to configure security without having to hard-code it into the Servlet class code.5.JSP support: Responsible for translating JSP code into real java.P.S: How does a container handle a request? P42A city servlet can have 3 names1. URL name that the customer knows2. The password internal name that the Deployer knows3. The actual fully qualified nameEstablishing a mapping of
safety, servlet Lifecycle management, JSP support and logging, and so on. We don't need to write anymore, we just need to call the method.The process of distributing the request is as follows, although I don't think I need it.Mapping of 2.2 servletHow did Tomcat find the servlet?You can use XML attribute mappings to findServlet file path name under Web-inf's classes, the generic servlet has 3 names
URL name
The secret internal name, whic
Chapter OutlineThe difference between 1.servletConfig and ServletContextThe difference between 1.servletConfig and ServletContext
From the deployment point of view, ServletConfig is in the servlet, and ServletContext is under Web-app
From the code,Getservletcontext (). Getinitparameter ("foo"); Getservletconfig (). Getinitparameter ("foo")
From a usable point of view, ServletConfig is available only to the corresponding servlet, while ServletContext is useful for all
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.