单项选择题
为了实现图片的下载,配置struts.xml文件时能够填写在横线处的代码是()。
A.text/plain
B.image/gif
C.octet-stream
D.application/msword
相关考题
-
单项选择题
假设在Struts 2的struts.xml中有如下拦截器配置:下列说法不正确的是()。
A.该拦截器执行时,不会调用Struts2中的默认拦截器栈defaultStack
B.拦截器栈myStack的定义有误,应该使用< interceptor-stacks>标签
C.< default-interceptor-ref>标签用来定义默认拦截器或拦截器栈的引用
D.< interceptor-stack>标签中可以定义多个拦截器的引用 -
单项选择题
下列关于在Struts 2中访问Servlet API的说法错误的是()。
A.ActionContext是以解耦合方式访问Servlet API
B.ServletActionContext和ActionContext都有getSession()方法,都返回Map对象
C.ActionContext类只封装部分Servlet API,有些功能需要原始的Servlet API才能实现,这种情况就需要使用ServletActionContext类
D.Action可以实现特定的接口,由Struts 2框架向Action注入Servlet API对象 -
单项选择题
在Struts 2应用中,能正确处理中文乱码问题的设置是()。
A.< constant name="struts.i18n.encoding"value="UTF-8">
B.< constant name="struts.custom.i18.encoding"value="UTF-8">
C.< constant name="struts.custom.i18.resources"value="UTF-8">
D.< constant name="struts.ui.theme"value="UTF-8">
