java notes javaweb part

 

Talk about http get and post the difference between requests?

1. get the requested data will be displayed in the address bar, and the post will not

2. Get the data transmission is limited, POST data transmission is not limited.

3. Post than get a high security

Say what you understand servlet. A servlet is or what?

With server-side program written in java. It can interactively view and modify data, generate dynamic web content.

Briefly about the servlet life cycle?

1. The  loading and instantiating

2.  Initialization

3. The  request processing and

4. The  end of the service

The Servlet API forward () and redirect () the difference?

Forward forwarding redirect redirect

1, forward server-side steering and redirect the jump-client.

2, the use of forward browser's address does not change. The redirect will change.

3, Forward is a complete request. The redirect is to re-initiate the request.

4, Forward is on the server side, rather than the client request to reinitiate high efficiency.

Jsp and servlet what similarities and differences there?

JSP focuses on view, the servlet for control logic.

Jsp which have built-in objects? What role are?

9 built-in objects

Page: jsp page itself

Config : the servlet framework member

The Application : the servlet content being executed

Request : request

responce : respond

The Session : Session on the request related

OUT : output for transmitting response

Exception for the wrong page, uncaught exception:

pageContext : property management page is here

Four Scope: pageContext the session the Application Request

Talk about the session and cookies difference? What are you using to place in the project?

1. cookie stored on the client side, the session is stored on the server

2. Cookie no session security

3. Session compare occupy server performance, you should use the cookie

The login and other important information is stored in the session

Additional information will be stored in the cookie , such as shopping cart

What are the various parts of the MVC technology to achieve?

Model ( javaBean)

View (html, jsp)

The controller ( the servlet, Action)

jsp+servlet+javaBean

Guess you like

Origin www.cnblogs.com/bianshiguang/p/10990003.html