Servlet usage

Servlet running process

 

Servlet implementation class

Use IDEA development Servl

 

 

 

Servlet path mapping problem

1. In general we will specify a URL, a URL request corresponding to a
2 wildcard question
/ *: no error
* .do

Redirect

 

This request is converted to another address;

 

For example, we request: HTTP: // localhost: 8080 / servlet01 / dasdasdasda / aaaa.do he will jump to the Baidu home page;

// redirect page response objects 
resp.sendRedirect ( "404.jsp");

 

ServletContext

 

Guess you like

Origin www.cnblogs.com/xiaoqiqistudy/p/11221842.html