STRUTS模拟试题


1MVC模式,是否所有JSP用都采用MVC模式,请说明理由

2. Struts用的模型中包含哪些?(多
(A) JSP
(B) Servlet
(C) ActionServlet
(D) Action
(E)代表业务逻辑业务数据的JavaBean
(F) EJB
(G) 客标签

3. Struts用的控制器中包含哪些?(多
(A) JSP
(B) Servlet
(C) ActionServlet
(D) Action
(E)代表业务逻辑业务数据的JavaBean
(F) EJB
(G) 客标签

4.以下代了一个量,如何量的?(多
<bean:define id=\"stringBean\" value=“helloWorld“/>
选项:
(A)<bean:write name=“stringBean\"/>
(B) <bean:write name=“helloWorld\"/>
(C)<%= stringBean%>
(D)
<% String myBean=
(String)pageContext.getAttribute(“stringBean”,PageContext.PAGE_SCOPE);
%>
<%=myBean%>

5.请列出Struts标签库所包含的几种标签库.

6.把静文本放在Resource Bundle中,而不是直接在JSP文件中包含些静文本,有什么优?(多
A)提高可维护
B)提高可重用性
C)支持国
D)提高运行速度

7以下哪些法是正确的?(单选
(A)HTTP对应一个独的ActionServlet
(B)访问HelloAction的HTTP求,Struts框架会建一个独的HelloAction例。
(C)个子对应一个独的RequestProcessor
(D)个子对应一个独的web.xml文件
8下面哪些任RequestProcessor完成的?(多
选项
(A)把Struts配置文件信息加到内存中
(B)把源文件信息入到内存中
(C)如果需要的ActionForm例,装数据,并行表单验证
(D)找到匹配的Action例,用其execute()方法
(E)把转发Action的execute()方法返回的ActionForward代表的

9.于以下代HelloAction希望把转发给hello.jsp,在HelloAction的execute()方法中如何实现?(多
<action    path      = \"/HelloWorld\"
          type      = \"hello.HelloAction\"
          name     = \"HelloForm\"
          scope     = \"request\"
          validate   = \"true\"
         input     = \"/hello.jsp\"
>
        <forward name=\"SayHello\" path=\"/hello.jsp\" />
</action>
选项:
(A) return (new ActionForward(mapping.getInput()));
(B) return (mapping.findForward(\"SayHello\"));
(C) return (mapping.findForward(“hello.jsp\"));

10.简述struts工作流程.

猜你喜欢

转载自blog.csdn.net/zhangchen124/article/details/80533040