以下有关自定义servlet、filter错误的是()

题目
单选题
以下有关自定义servlet、filter错误的是()
A

是在uap项目的weB.xml中定义servlet、filter

B

在模块中定义servlet、filter时,首先是模块的启动顺序决定了模块中所有servlet、filter的顺序

C

如果同一个模块中servlet、filter定义在不同的文件中,文件被加载解析的顺序也会影响模块servlet、filter的顺序

D

模块中同一个配置文件中定义的servlet、filter按被定义的前后顺序处理

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

Youwanttocreateafilterforyourwebapplicationandyourfilterwillimplementjavax.servlet.Filter.Which twostatementsaretrue?()

A.Yourfilterclassmustimplementaninitmethodandadestroymethod.

B.Yourfilterclassmustalsoimplementjavax.servlet.FilterChain.

C.Whenyourfilterchainstothenextfilter,itshouldpassthesameargumentsitreceivedinitsdoFiltermethod.

D.Themethodthatyourfilterinvokesontheobjectitreceivedthatimplementsjavax.servlet.FilterChaincaninvokeeitheranotherfilteroraservlet.

E.YourfilterclassmustimplementadoFiltermethodthattakes,amongotherthings,anHTTPServletRequestobjectandanHTTPServletResponseobject.


参考答案:A, D

第2题:

Servlet可以通过以下哪个接口实现请求转发机制?()

  • A、HttpServletRequest接口
  • B、RequestDispatcher接口
  • C、HttpServletResponse接口
  • D、ServletConfig接口
  • E、Filter接口

正确答案:B

第3题:

关于ServletFilter,下列说法正确的有()

A.Filter其实就是一个Servlet

B.Filter可以产生response

C.Filter可以在Servlet被调用之前截获request

D.Filter可以哟活过来处理统一认证,过滤不雅字句等


参考答案:C, D

第4题:

关于Servlet Filter,下列说法正确的有() 

  • A、Filter其实就是一个Servlet
  • B、Filter可以产生response
  • C、Filter可以在Servlet被调用之前截获request
  • D、Filter可以哟活过来处理统一认证,过滤不雅字句等

正确答案:C,D

第5题:

关于自定义sevlet下面说法错误的是()

  • A、平台要配置自定义的servlet不能在uap项目里面配置
  • B、servlet的处理顺序不能够控制
  • C、通过module:servletfilter标签来声明
  • D、module:init-param可以定义初始化参数

正确答案:B

第6题:

在JAVA EE中,使用Servlet过滤器时,需要在web.xml通过()元素将过滤器映射到Web资源。

  • A、〈filter〉
  • B、〈filter-mapping〉
  • C、〈servlet〉
  • D、〈servlet-mapping〉

正确答案:B

第7题:

Given the web application deployment descriptor elements: 11. 12.ParamAdder 13.com.example.ParamAdder 14.... 24. 25.ParamAdder 26.MyServlet 27. 28. Which element, inserted at line 27,causes the ParamAdder filter to be applied when MyServlet is invokedby another servlet using the RequestDispatcher.include method?()

  • A、<include/>
  • B、<dispatcher>INCLUDE</dispatcher>
  • C、<dispatcher>include</dispatcher>
  • D、<filter-condition>INCLUDE</filter-condition>
  • E、<filter-condition>include</filter-condition>

正确答案:B

第8题:

Giventhewebapplicationdeploymentdescriptorelements:11.<filter>12.<filter-name>ParamAdder</filter-name>13.<filter-class>com.example.ParamAdder</filter-class>14.</filter>...24.<filter-mapping>25.<filter-name>ParamAdder</filter-name>26.<servlet-name>MyServlet</servlet-name>27.<!--insertelementhere-->28.</filter-mapping>Whichelement,insertedatline27,causestheParamAdderfiltertobeappliedwhenMyServletisinvokedbyanotherservletusingtheRequestDispatcher.includemethod?()

A.<include/>

B.<dispatcher>INCLUDE</dispatcher>

C.<dispatcher>include</dispatcher>

D.<filter-condition>INCLUDE</filter-condition>

E.<filter-condition>include</filter-condition>


参考答案:B

第9题:

Which the three are true about servlet filters?()

  • A、 A filter must implement the destroy method
  • B、 A filter must implement the doFilter method
  • C、 A servlet may have multiple filters associated with it
  • D、 A servlet that is to have a filter applied to it must implement the javax.servlet.FilterChain  interface
  • E、 A filter that is part of a filter chain passes control to the next filter in the chain by invoking the filterChain forward method
  • F、 For each  element in the web application deployment descriptor, multiple instances of a filter may be created by the web container

正确答案:A,B,C

第10题:

在J2EE中使用Servlet过滤器时,可以在web.xml文件的()元素中包括<init-param>元素。

  • A、<filter>
  • B、<filter-mapping>
  • C、<filter-name>
  • D、<filter-class>

正确答案:A

更多相关问题