多项选择题
下列自定义拦截器代码语法正确的是()。
A.public class MyInterceptor implements Interceptor {public String intercept(ActionInvocation invocation)throws Exception {…}}
B.public class MyInterceptor extends AbstractInterceptor {public String intercept(ActionInvocation invocation)throws Exception {…}}
C.public class MyInterceptor implements Interceptor {public void init(){…}public String intercept(ActionInvocation invocation)throws Exception {…}}
D.public class MyInterceptor extends AbstractInterceptor {public void init(){…}public String intercept(ActionInvocation invocation)throws Exception {…}}
相关考题
-
多项选择题
在Struts 2框架中访问Servlet API对象描述错误的是()。
A.ServletActionContext和ActionContext都有getRequest()方法,都返回HttpServletRequest对象ServletActionContext没有getRequest()方法
B.ServletActionContext和ActionContext访问Servlet API时,都无需直接调用原始Servlet API)
C.Action可以实现特定的接口,由Struts 2框架向Action注入Servlet API对象,这种编程思想称为IoC
D.ActionContext类没有封装所有Servlet API的访问方法,所以有时也需要使用ServletActionContext -
多项选择题
在使用Struts 2的应用中,实现服务器端返回Ajax数据的错误选项是()。
A.指定Struts 2原有的stream类型结果集
B.指定Struts 2原有的redirect类型结果集
C.使用第三方jar包,实现Struts 2的json类型结果集
D.使用Struts 2原有的despatcher类型结果集 -
多项选择题
下列选项中关于XMLHttpRequest对象的说法错误的是()。
A.XMLHttpRequest对象是Ajax技术的核心,它的作用是可以发送异步请求到服务器端
B.status属性的作用可以返回当前请求的就绪状态,其常用值为:0、1、2、3、4
C.readyState属性的作用可以返回当前请求的HTTP状态码,其常用值404表示找不到访问对象
D.当就绪状态是4且状态码是200时,方可处理服务器数据
