Jsp first 2 error correction

Answer: C This question examines the use of request to obtain form request data. The same name can be obtained using getParameterValues.

 

Answer: B

Response.setContentType() is used to set the display format and encoding of the web page.

Answer: C

This question examines the characteristics of forwarding. First visit one.jsp and click the link, three.jsp will be displayed directly, but the address bar will not change when forwarding, and clicking the hyperlink directly is not a forwarding action, so the address bar first becomes ../two.jsp ?param=helloword, and forwarding is used in two.jsp, the address bar remains unchanged, and the final result of the address bar is ../two.jsp?param=helloword So the answer is C

 

 

 

Answer: CD

Analysis: This question examines the understanding of the encoding of the response object setting, response.setContentType("text/html;charset=UTF-8"); is to set the encoding and what encoding is used by the browser to open, while response.setCharacterEncoding( "UTF-8"); means that the encoding is set, so the problem of garbled characters may appear when the browser is opened, so the options of C and D are wrong, so the answer is C, D

 

 

 

 

Comments in JSP are divided into two kinds of comments: Explicit comments: there are comments "<!--comment content-->" in HTML Implicit comments: You can use "//", "/*… .*/", and its own comment in JSP: "<%-- comment content--%>" The so-called explicit or implicit actually refers to the displayed code when viewing the source file. Options A, B, and C can annotate java code, D is used to annotate HTML, and cannot annotate java code, so choose D.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324859391&siteId=291194637