在struts框架中,使用ActionForm类进行输入验证时,以下代码片段正确的是() 版本问题:1.1可以使用ActionError对象,在1.2里面,应该使用ActionMessage。 errors.add(“property”,newActionMessage(“资源文件中的key”)); errors.add(“property”,newActionMessage(“提示信息”,false));//false表示前面的字符串不是来自于资源文件。
第1题:
在struts配置文件中,()元素可用于配置struts的validator框架。
第2题:
ActionForm中的validate方法返回什么值,表明是验证成功()
第3题:
在Struts框架中如果要使用Validation作验证的话,需要使用以下哪个Form()。
第4题:
关于struts1和struts2对比的说法正确的是()
第5题:
Struts框架中,()允许为struts应用灵活地配置验证规则,无需编程。
第6题:
在struts-config.xml配置文件中,使用()元素来指定自定义的一个RequestProcessor。
第7题:
关于国际化,下面那句话是错误的是()
第8题:
null
空字符串
一个空的ActionError对象
一个空的ActionErrors对象
第9题:
null
空字符串
一个空的ActionError对象
一个空的ActionErrorS对象
第10题:
不要使用String类的compareTo(),equals()方法。
在进行字符串连接时,不要使用String,使用StringBuffer。
不要使用Date.toString(),Time.toString()方法。
字符和字符串常量应该放在资源文件中。
第11题:
form-beans
action
controller
set-property
第12题:
struts1要求Action类继承struts1框架中的Action父类,struts2中则不一定需要继承,可以是POJO类
struts1中的Action不是线程安全的,而struts2中的Action是线程安全的
struts1和struts2中都使用ActionForm对象封装用户的请求数据
struts1使用OGNL表达式语言来支持页面效果,struts2通过ValueStack技术使标签库访问值
第13题:
现在项目主要使用的Struts版本比较稳定和成熟的是()
第14题:
下列关于Struts框架的说法中,不正确的是()
第15题:
C#中TestClass为一自定义类,其中有以下属性定义 publicvoidProperty{…} 使用以下语句创建了该类的对象,并使变量obj引用该对象: TestClassobj=newTestClass(); 那么,可通过什么方式访问类TestClass的Property属性?()
第16题:
下面哪些任务是RequestProcessor完成的()
第17题:
struts框架中,使用以下()标签可以显示数据验证错误信息。
第18题:
在struts框架中,以下()语句可以输出Userbean(Bean对象名称为user)中name属性的值。
第19题:
Struts实质是JSPModel2的基础上实现的一个MVC框架
在Struts框架中,视图是由一组JSP文件组成
在Struts框架中,控制器是由ActiongServlet和Action来实现
在Struts仅仅可以在服务器端运行,仅仅能通过ActionForm中的validate方法能对提交的表单数据进行验证
第20题:
ActionErrorserrors=newActionErrors();errors.add(loginFailed,failtologin);saveErrors(request,errors)
ActionErrorserrors=newActionErrors();errors.add(loginFailed,newActionError(login.failed));saveErrors(request,errors)
request.setAttribute(error,newActionErrors(“login.failed”))
ActionErrorserrors=newActionErrors(login.failed”);saveErrors(request,errors)
第21题:
<bean:writeid=”user”property=”name”>
<bean:messageid=”user”property=”name”>
<bean:writename=”user”property=”name”>
<bean:messagename=”user”property=”name”>
第22题:
plug-in
embeded
form-beans
set-property
第23题:
把Struts配置文件信息加载到内存中
把资源文件信息读入到内存中
如果需要的话,创建ActionForm实例,组装数据,并进行表单验证
把请求转发到Action的execute()方法返回的ActionForward代表的组件