欢迎来到计算机考试题库网 计算机题库官网
logo
全部科目 > 大学试题 > 计算机科学 > Java考试 > JSP考试

多项选择题

在Struts 2的应用中,要请求一个资源,其URL为:http://…/myaction/dologin.action,并且要访问其Action中的login()方法,下面选项对其配置不正确的是()。

    A.<struts><package name="default"namespace="/myaction"extends="struts-default"><action name="dologin!login"class="……"></action></package></struts>
    B.<struts><package name="default"namespace="/myaction"extends="struts-default"><action name="dologin"class="……"method="login"></action></package></struts>
    C.<struts><package name="default"namespace="/myaction"extends="struts-default"><action name="do*"class="……"method="{1}"></action></package></struts>
    D.<struts><package name="default"namespace="/myaction"extends="struts-default"><action name="dologin"class="……"></action></package></struts>

点击查看答案&解析

相关考题

  • 多项选择题
    下列自定义拦截器代码语法正确的是()。

    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类型结果集

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题