软件架构(期末复习题)

2021/5/11 10:25:37

本文主要是介绍软件架构(期末复习题),对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

Stuts2+Spring+Hibernate

1.The Model-ViewController pattern in Struts2 is implemented with the following core component.
A.Structure
B.Interceptors 拦截器
C.Array
D.Database

2.Create configuration files to couple the Action, View and Controllers. These files are_______.
A.Struts.xml, web.xml, struts.properties.
B.Class.xml, web.xml, Struct2.html
C.Class.xml, web.xml, struts.xml
D.struts.xml, Class.xml, struts.properties.

3.How to enable Detailed Log.
A.creating logging.properties
B.creating logging.xml
C.creating logging.html
D.None of the above.

4.Struct act much more friendly for developer if we set.
A.Structs.devmode= Null;
B.Structs.devmode= Auto;
C.Structs.devmode= True;
D.Structs.devmode= False;

5.Here any line starting with hash (#) will be assumed as a ____ .
A.Instruction
B.Execution line
C.Address
D.Comments

6.What are the Struts2 configuration properties that control file uploading process?
A.struts.multipart.maxSize
B.struts.multipart.parser
C.struts.multipart.saveDir
D.All of the above.

7.Can you override the default error message that can come during file uploading process?
A.Yes
B.No

8.The following code refer to.

<interceptor-stack name = "basicStack">
<interceptor-ref name = "exception"/>
<interceptor-ref name = "servlet-config"/>
<interceptor-ref name = "prepare"/>
<interceptor-ref name = "checkbox"/>
 <interceptor-ref name = "params"/>
<interceptor-ref name = "conversionError"/>
</interceptor-stack>

A.Stacking Multiple Interceptors 叠加多个拦截器
B.Configuration Interceptor
C.Action Interceptor
D.Interceptor Attribute

9.You can call same interceptor with the different actions.
你可以用不同的动作调用相同的拦截器。
A.True
B.False

10.These objects include #application, #session, #request, #attr and #parameters and refer to the corresponding servlet scopes.
这些对象包括#application、#session、#request、#attr和#参数,并引用相应的servlet作用域。
A.True
B.False

11.Object peek() Get the object on the top of the stack and changing the stack.
获取堆栈顶部的对象并更改堆栈。
A.True
B.False

12.Which of the following sentence is the true for the ONGL
A.The Object-Graph Navigation Language (OGNL) is a powerful expression language that is used to reference and manipulate data on the ValueStack.
B.OGNL also helps in data transfer and type conversion.
C.The OGNL is very similar to the JSP Expression Language.
D.All of the above

13.If you have an attribute in session called “login” you can retrieve it as follows _______.
A.<s:property value=”#session.login”/>
B.<s:property value=”@session.login”>
C.<s:property value=”session.login”/s>
D.<s:property name=”@session.login”>

14.struts.multipart.saveDir The location to store the temporary file. By default is______.
A.javax.servlet.context.Userdirectory
B.javax.servlet.path.tempdir.
C.javax.servlet.context.tempdir.
D.javax.servlet.path.Userdirectory.

15.struts.messages.error.uploading
A.A general error that occurs when the file could not be open.
B.A general error that occurs when the file could not be uploaded.
C.A general error that occurs when the file could not be match the name.
D.A general error that occurs when the file could not be Downloaded.

16.The simplest naming format for a resource file is ______.
A.Bundlename_language_country.propertiers
B.Recourse_language_country.propertiers
C.Bundlename_language_country.recourse
D.None of the above

17.By default, English (United States) will be applied
A.global_us.properties
B.global_en.properties
C.global.properties
D.global.properties_us

18.the following instruction show the Customized them.
A.Struts.ui.theme=mytheme
B.Struts.ui.templateDir=template
C.Struts.ui.templateSuffix= ftl
D.Struts.ui.theme= Custom_theme

19.To start using annotations in your project, make sure you have included the following jar files in your _______.
A.WebContent/WEB-INF/elb
B.WebContent/WEB-INF/lib
C.WebContent/Localhost:8080/lib
D.Localhost:8080/WEB-INF/lib

20.Following is the iterator tag.
A.<s:param_iterate value=”interate”>
B.<s:param.iterate value=”interate”>
C.< iterate value=” iterate”>
D.<s:iterate value=”data”/>

21.In the following which sentence Define the Action.
A.Create interceptors if required, or use existing interceptors. This is part of Controller.
B.Create a class which will contain complete business logic and control the interaction between the user, the model, and the view.
C.Create a JSPs to interact with the user to take input and to present the final messages.
D.Create files to couple the Action, View and Controllers. These files are struts.xml, web.xml, struts.properties.

22.Following is the example to create _____ page.

<%@ page contentType = "text/html; charset = UTF-8" %>
<%@ taglib prefix = "s" uri = "/struts-tags" %>
<html>
<head>
<title>Hello World</title>
</head>
<body>
Hello World, <s:property value = "name"/>
</body>
</html>

A.Main Page
B.Action Page
C.View
D.File configuration

23.The Model-ViewController pattern in Struts2 is implemented with the _ core ___ components.
A.Two
B.Three
C.Seven
D.Five

24.Which of the following tag is used to get the property of a value, which will default to the top of the stack if none is specified?
A.date tag
B.Param tag
C.Property tag
D.Push tag

25.The following code refer to Interceptor Property

<interceptor-stack name = "basicStack">
<interceptor-ref name = "exception"/>
<interceptor-ref name = "servlet-config"/>
<interceptor-ref name = "prepare"/>
<interceptor-ref name = "checkbox"/>
 <interceptor-ref name = "params"/>
<interceptor-ref name = "conversionError"/>
</interceptor-stack>

A.True
B.False

26.The Below file is a template where name is a parameter which will be passed from outside using the defined action.
A.Hello world ${name}

B.Hello World(Name)
C.Helloworld(#name)
D.Hello world {$name}

27.The Struts 2 framework provides built-in support for processing file upload using “Form-based File Upload in HTML”.
Struts 2框架通过“HTML中基于表单的文件上传”提供了对处理文件上传的内置支持。
A.False
B.True

28.The following chunk of code we use in _____.

import java.io.File;
import org.apache.commons.io.FileUtils;
import java.io.IOException; 

A.View Class
B.Main Class
C.Action Class
D.Option A and C

29.struts.multipart.maxSize The maximum size (in bytes) of a file to be accepted as a file upload. Default is______.
A.300M
B.150M
C.250M
D.500M

30.Following is the append tag.
A.<s:param_append value=”interate”>
B.<s:param.append value=”interate”>
C.< append value=” iterate”>
D.<s:append value=”data”/>

31.struts.multipart.saveDir The location to store the temporary file. By default is javax.servlet.context.Userdirectory.
E.True
F.False

32.You can call same interceptor with the different actions.
A.True
B.False

33.Object peek() Get the object on the top of the stack and changing the stack.
C.True
D.False

34.What are the Struts2 configuration properties that control file uploading process?
A.struts.multipart.maxSize
B.struts.multipart.parser
C.struts.multipart.saveDir
D.All of the above

35.If you have an attribute in session called “login” you can retrieve it as follows___.
A.<s:property value=”#session.login”/>
B.<s:property value=”@session.login”>
C.<s:property value=”session.login”/s>
D.<s:property name=”@session.login”>

36.int size() Get the number of objects in the stack.
A.True
B.False

37.The simplest naming format for a resource file is ______.
A.Bundlename_language_country.propertiers
B.Recourse_language_country.propertiers
C.Bundlename_language_country.recourse
D.None of the above

38.In addition to the above, we have to copy the following jar files from the struts2 download in your WEB-INF/lib.
A.commons-beanutils-x.y.zjar 用于POJO的属性赋值、拷贝等
B.commons-digester-x.y.jar 用于解析配置文件
C.struts2-tiles-plugin-x.y.z.jar commons-validator-x.y.z.jar 用于表单验证

39.The configLocation parameter specifies the name and location of the Spring configuration file, such as “applicationContext. xml”.
A.configLocation
B.#config_Location
C.configLocation_Path
D.#Path_configLocation

40.commons-fileupload-x.y.z.jar, commons-io-x.y.z.jar, commons-lang-x.y.jar, commons-logging-x.y.z.jar, commons-logging-api-x.y.jar,freemarker-x.y.z.jar etc. filse are used to creat.
A.Action page
B.Static Project
C.Dynamic Project

41.The redirect result type calls the standard ____ method, causing the browser to create a new request to the given location.
A.response.sendRedirect()
B.response.Redirect()
C.location.sendRedirect()
D.location.Redirect(path)

42.int size() Get the number of objects in the stack.
A.True
B.False

43.Following is the Generator tag.
E.<s:param_Generator value=” Generator”>
F.<s:param. Generator value=” Generate”>
G.< Generator value=” iterate”>
H.<s: Generator value=”data”/>

44.The configLocation parameter specifies the name and location of the Spring configuration file, such as “applicationContext. xml”.
C.configLocation
D.#config_Location
E.configLocation_Path
F.#Path_configLocation

45.Which class of struts is responsible to converts data types from string?
A.StrutsTypeConverter
B.StringTypeConverter
C.Both of the above.
D.None of the above.

46.In the following which sentence Define the Configuration Files.
A.Create interceptors if required, or use existing interceptors. This is part of Controller.
B.Create a class which will contain complete business logic and control the interaction between the user, the model, and the view.
C.Create a JSPs to interact with the user to take input and to present the final messages.
D.Create files to couple the Action, View and Controllers. These files are struts.xml, web.xml, struts.properties.

47.commons-fileupload-x.y.z.jar, commons-io-x.y.z.jar, commons-lang-x.y.jar, commons-logging-x.y.z.jar, commons-logging-api-x.y.jar,freemarker-x.y.z.jar etc. filse are used to creat.
D.Action page
E.Static Project
F.Dynamic Project
G.None of the above

48.It should be noted that you can register more than one interceptors inside tag and same time you can call more than one interceptors inside the tag.
A.True
B.False

49.struts.multipart.maxSize The maximum size (in bytes) of a file to be accepted as a file upload. Default is 100M.
E.True
F.False

50.In addition to the above, we have to copy the following jar files from the struts2 download in your WEB-INF/lib.
D.commons-beanutils-x.y.zjar
E.commons-digester-x.y.jar
F.struts2-tiles-plugin-x.y.z.jar
G.All of the above

51.Following is the iterator tag.
A.<s:param_iterate value=”interate”>
B.<s:param.iterate value=”interate”>
C.< iterate value=” iterate”>
D.<s:iterate value=”data”/>

52.By default, English (United States) will be applied
E.global_us.properties
F.global_en.properties
G.global.properties
H.global.properties_us

53.struts.messages.error.uploading
E.A general error that occurs when the file could not be open.
F.A general error that occurs when the file could not be uploaded.
G.A general error that occurs when the file could not be match the name.
H.A general error that occurs when the file could not be Downloaded.

54.Which of the following sentence is the true for the ONGL
E.The Object-Graph Navigation Language (OGNL) is a powerful expression language that is used to reference and manipulate data on the ValueStack.
F.OGNL also helps in data transfer and type conversion.
G.The OGNL is very similar to the JSP Expression Language.
H.All of the above

55.These objects include #application, #session, #request, #attr and #parameters and refer to the corresponding servlet scopes.
A.True
B.False

56.The Model-ViewController pattern in Struts2 is implemented with the _ core ___ components.
E.Two
F.Three
G.Seven
H.Five

57.Following is the example to create _____ page.

<%@ page contentType = "text/html; charset = UTF-8" %>
<%@ taglib prefix = "s" uri = "/struts-tags" %>
<html>
<head>
<title>Hello World</title>
</head>
<body>
Hello World, <s:property value = "name"/>
</body>
</html>

E.Main Page
F.Action Page
G.View
H.File configuration

58.The Below file is a template where name is a parameter which will be passed from outside using the defined action.
A.Hello world ${name}

B.Hello World(Name)
C.Helloworld(#name)
D.Hello world {$name}

59.The following chunk of code we use in _____.

import java.io.File;
import org.apache.commons.io.FileUtils;
import java.io.IOException; 

E.View Class
F.Main Class
G.Action Class
H.Option A and C

60.Following is the append tag.
A.<s:param_append value=”interate”>
B.<s:param.append value=”interate”>
C.< append value=” iterate”>
D.<s:append value=”data”/>

如有错误,欢迎指出!
题源参考:https://www.cnblogs.com/wydxry/p/10962256.html



这篇关于软件架构(期末复习题)的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程