当前位置:网站首页>[Yu Yue education] Liaoning Vocational College of Architecture Web server application development reference
[Yu Yue education] Liaoning Vocational College of Architecture Web server application development reference
2022-07-06 01:18:00 【yuyueshool】
education
-Web Server side application development - Chapter materials, examination materials - Liaoning Vocational College of architecture 【】
Practice
1、【 Judgment questions 】Web Full name World Wide Web, abbreviation WWW, Translated as world wide web or global information network .
A、 correct
B、 error
Reference material 【 】
2、【 Judgment questions 】 So-called B/S structure , namely Browser/Server ( browser / The server ) structure , Also known as desktop applications .
A、 correct
B、 error
Reference material 【 】
3、【 Judgment questions 】C/S Browser side and server side adopt request / Interact with response patterns .
A、 correct
B、 error
Reference material 【 】
Practice
1、【 Single topic selection 】java web The files of the application must be organized according to certain specifications , The following statement is wrong ?
A、classes Directory in web Under the root directory of the application .
B、WEB-INF The catalog contains classes Catalog .
C、jsp and html Documents are usually stored in web Under the root directory of the application .
D、web The application directory is web The root directory of the program , contain WEB-INF Contents and web.xml Deployment description file .
Reference material 【 】
2、【 Single topic selection 】 In the configuration Java Web Environmental time , install jdk after , Which of the following is not an environment variable to be configured ?
A、classpath
B、java_home
C、class_path
D、path
Reference material 【 】
3、【 Single topic selection 】 stay HTTP Response , The status code 404 Express :
A、 The server cannot find the resource specified in the request
B、 There is a syntax error in the request message
C、 The request needs to be authenticated and / Or authorized
D、 Server understands customer's request , But the customer refused to handle it because of insufficient authority
Reference material 【 】
Practice
1、【 Judgment questions 】Servlet Run on the server side , and applet Run on the client .
A、 correct
B、 error
Reference material 【 】
2、【 Judgment questions 】 Users write their own Servlet Class time , What kind of HTTP Request for processing , Just cover HTTPServlet Class do***() The method can .
A、 correct
B、 error
Reference material 【 】
3、【 Judgment questions 】 User written processing HTTP Requested Servlet Class time , Must inherit HTTPServlet class .
A、 correct
B、 error
Reference material 【 】
4、【 Judgment questions 】web.xml Medium servlet-name The value of should be Servlet Class name .
A、 correct
B、 error
Reference material 【 】
5、【 Judgment questions 】web.xml Medium servlet-class Value specifies Servlet Class name , Does not include package name .
A、 correct
B、 error
Reference material 【 】
Practice
1、【 Single topic selection 】 About Servlet API The following statement is wrong ?
A、javax.servlet In bag Servlet Interfaces are all Servlet The interface that the class must implement .
B、 The request information sent from the client will be encapsulated in ServletResponse Among the objects .
C、 All for processing HTTP Requested Servlet Classes must inherit from HTTPServlet class .
D、 call Servlet Object's getServletConfig() Method can get the container passed to Servlet Of ServletConfig References to objects .
Reference material 【 】
2、【 Single topic selection 】Servlet stay service() In the method, we use __①__ Object to get user request information , And process the request , Then package the response information into __②__ object .
A、①ServletRequest ②ServletResponse
B、①ServletConfig ②ServletResponse
C、①ServletRequest ②HttpServletResponse
D、①ServletConfig ②HttpServletResponse
Reference material 【 】
3、【 Single topic selection 】servlet It can be transmitted by the container HttpServletRequest Object's _____ Method to get the input parameters requested by the customer .
A、getParameter
B、getProtocol
C、getContentType
D、getAttribute
Reference material 【 】
4、【 Judgment questions 】 stay ServletConfig Object contains Servlet Initialization parameter information for , Besides ,ServletConfig The object is also related to the current Web Applied ServletContext Object association .
A、 correct
B、 error
Reference material 【 】
Project development
Project one test
1、【 Judgment questions 】HTTP The connectionless meaning of the protocol is to limit each connection to only one request .
A、 correct
B、 error
Reference material 【 】
2、【 Judgment questions 】Web The application uses a two-tier architecture : Data layer and business layer .
A、 correct
B、 error
Reference material 【 】
3、【 Judgment questions 】Web Deployment description file of the application , This file contains relevant Web Metadata information of the application , The root element is web-app.
A、 correct
B、 error
Reference material 【 】
4、【 Judgment questions 】 In a Web In the directory WEB-INF Set up under the directory classes Catalog 、lib Directory and web.xml Documents are essential
A、 correct
B、 error
Reference material 【 】
5、【 Judgment questions 】Servlet API Included in two packages :Javax.servlet、Javax.servlet.http.
A、 correct
B、 error
Reference material 【 】
Practice
1、【 Single topic selection 】 Which of the following is not a server application object ?
A、ServletRequest
B、ServletContext
C、out
D、Cookie
Reference material 【 】
2、【 Single topic selection 】 When Servlet When container starts , The container will provide Web The application creates a _________ object , When programming, you can use this object to get and Web Application related information .
A、Servlet
B、ServletRequest
C、ServletContent
D、ServletContext
Reference material 【 】
3、【 Single topic selection 】ServletContext Who created the object ?
A、 from Servlet The container is responsible for creating , For each HTTP request , Servlet The container will create a ServletContext object
B、 from JavaWeb The application itself is responsible for creating a ServletContext object
C、 from Servlet The container is responsible for creating , For each JavaWeb application , When it starts ,Servlet The container will create a ServletContext object
D、HttpServletRequest Object's getParameter() Method
Reference material 【 】
4、【 Judgment questions 】Web Application parameters can be found in Web All of the apps Servlet Pass through ServletContext Object read .
A、 correct
B、 error
Reference material 【 】
Practice
1、【 Judgment questions 】Servlet API Defined a HttpSession Interface , allow Servlet The container establishes one for each user HTTP conversation ( namely HttpSession object ).
A、 correct
B、 error
Reference material 【 】
2、【 Judgment questions 】ServletContext The object is Web Server created , stay Servlet Through HttpServletRequest Object's getSession() Method to get .
A、 correct
B、 error
Reference material 【 】
3、【 Judgment questions 】 It can be done by web.xml Medium session-timeout Mark the expiration time of the configuration session , The unit is in seconds .
A、 correct
B、 error
Reference material 【 】
Practice
1、【 Single topic selection 】 One Servlet Which method can be used to redirect the client browser to a new URL?
A、HttpServletResponse Class sendStatus Method
B、HttpServletResponse Class sendRedirect Method
C、HttpServletResponse Class setLocale Method
D、HttpServletResponse Class sendError Method
Reference material 【 】
2、【 Judgment questions 】 Use sendRedirect() Method will only cause one request - Respond to .
A、 correct
B、 error
Reference material 【 】
Practice
1、【 Judgment questions 】 stay Servlet Can be used in RequestDispatcher Object's forward Method contains a resource .
A、 correct
B、 error
Reference material 【 】
2、【 Judgment questions 】 stay Servlet In addition to forwarding requests to other Web Beyond resources , You can also reference another resource in one resource .
A、 correct
B、 error
Reference material 【 】
Project development
Item 2 test
1、【 Judgment questions 】ServletRequest,ServletResponse The scope of use of is valid within the scope of a session .
A、 correct
B、 error
Reference material 【 】
2、【 Judgment questions 】 When the client closes the browser, a session expires .
A、 correct
B、 error
Reference material 【 】
3、【 Judgment questions 】 Store data in the session object , have access to getAttribute(String name) Method .
A、 correct
B、 error
Reference material 【 】
4、【 Judgment questions 】Servlet There are two ways to request resource jump : Redirect and forward .
A、 correct
B、 error
Reference material 【 】
5、【 Judgment questions 】 Use forward Method to realize jump , After the jump, the user's URL Will change .
A、 correct
B、 error
Reference material 【 】
6、【 Judgment questions 】 Use sendRedirect Method to realize jump url It's the absolute path .
A、 correct
B、 error
Reference material 【 】
7、【 Judgment questions 】 Request forwarding and request inclusion are both one-time requests processed , So the server will only create one request Object and a response object .
A、 correct
B、 error
Reference material 【 】
8、【 Judgment questions 】 Request inclusion is actually a combination of multiple pages .
A、 correct
B、 error
Reference material 【 】
9、【 Judgment questions 】 Request inclusion refers to multiple Servlet Jointly handle a request .
A、 correct
B、 error
Reference material 【 】
Practice
1、【 Single topic selection 】 Browser defaults to ( ) Send data by encoding
A、GB2312
B、GBK
C、UTF-8
D、 Western Europe
Reference material 【 】
2、【 Judgment questions 】Servlet The filter itself does not generate request and response objects , It only provides filtering function
A、 correct
B、 error
Reference material 【 】
3、【 Judgment questions 】Servlet Multiple filters cannot be set .
A、 correct
B、 error
Reference material 【 】
4、【 Completion 】 The order of different filters in the filter chain is ( ) File .
A、
Reference material 【 】
Practice
1、【 Multiple choice 】 The methods involved in the filter life cycle are :
A、init()
B、doFilter()
C、add()
D、destroy()
Reference material 【 】
2、【 Judgment questions 】 All filters must be implemented java.servlet.Filter Interface .
A、 correct
B、 error
Reference material 【 】
3、【 Judgment questions 】 call FilterChain Object's doFilter() Method , Indicates that a new filter is called .
A、 correct
B、 error
Reference material 【 】
4、【 Completion 】Servlet The filter must be configured in ( ) In file .
A、
Reference material 【 】
边栏推荐
- Cve-2017-11882 reappearance
- Leetcode 剑指 Offer 59 - II. 队列的最大值
- How to get the PHP version- How to get the PHP Version?
- Condition and AQS principle
- DOM introduction
- 毕设-基于SSM高校学生社团管理系统
- Why can't mathematics give machine consciousness
- Leetcode1961. 检查字符串是否为数组前缀
- 关于#数据库#的问题:(5)查询库存表中每本书的条码、位置和借阅的读者编号
- Four dimensional matrix, flip (including mirror image), rotation, world coordinates and local coordinates
猜你喜欢

Condition and AQS principle

Beginner redis

伦敦银走势中的假突破

MySQL learning notes 2

黄金价格走势k线图如何看?

3D模型格式汇总

1791. Find the central node of the star diagram / 1790 Can two strings be equal by performing string exchange only once

Yii console method call, Yii console scheduled task

The growth path of test / development programmers, the problem of thinking about the overall situation

3D model format summary
随机推荐
电气数据|IEEE118(含风能太阳能)
282. Stone consolidation (interval DP)
ORA-00030
How to see the K-line chart of gold price trend?
Hundreds of lines of code to implement a JSON parser
Convert binary search tree into cumulative tree (reverse middle order traversal)
China Taiwan strategy - Chapter 8: digital marketing assisted by China Taiwan
Leetcode1961. 检查字符串是否为数组前缀
Recursive method to realize the insertion operation in binary search tree
Overview of Zhuhai purification laboratory construction details
Cglib dynamic agent -- example / principle
95后CV工程师晒出工资单,狠补了这个,真香...
MATLB | real time opportunity constrained decision making and its application in power system
vSphere实现虚拟机迁移
SPIR-V初窺
Recursive method converts ordered array into binary search tree
Fibonacci number
Leetcode sword finger offer 59 - ii Maximum value of queue
2020.2.13
cf:H. Maximal AND【位运算练习 + k次操作 + 最大And】