Topic: IBM 286 模拟题

  Print this page

1.IBM 286 模拟题 Copy to clipboard
Posted by: slacker
Posted on: 2004-05-11 01:39

WSAD TEST 286 Application Development with IBM WebSphere Studio, V5.0

1.Which of the following directory structures reflects the structure of a newly created Web project when the "Create a default CSS File" checkbox was checked?
A./Web Content/Java Source /Web Content/classes /Web Content/lib /Web Content/css
B./Java Source /Web Content/WEB-INF/classes /Web Content/WEB-INF/lib /Web
Content/theme
C./Java Source /Web Content/WEB-INF/classes /Web Content/WEB-INF/lib /Web
Content/css
D./Web Content/Java Source /Web Content/WEB-INF/classes /Web Content/lib /Web
Content/WEB-INF/theme
Select the best answer. (B)

2.While writing a scriptlet in a JSP, a web developer realizes that the same scriptlet is likely to be used frequently in other JSPs. The scriptlet contains many lines and is included inline in the JSPs. In this situation, a developer can leverage the Content Assist features by:

A.customizing the JSP scriptlet macro
B.using the Quick-Copy Feature to duplicate the scriptlet
C.creating a new macro with the required content
D.adding it to the Favorites Page in the Tasks View.
Select 2 answers. (AC)

3.Filters can be applied to a data connection for what purpose?
A.Restricting tables included in the generated data model
B.Restricting the data that is returned by any SQL statement executed against the connection
C.Setting limits on the maximum result set size returned via the connection
D.Setting limits on the number of concurrent queries that can be executed against the connection
Select the best answer. (A)

4.Which of the following artifacts CANNOT be generated by the SQL to XML wizard against a SQL select statement?
A.XML
B.HTML
C.XML Schema
D.JSP
E.XSL
Select the best answer. (D)

5.Which of the following patterns of Java classes are created as a result of using the Create Database Web Pages Wizard?
A.Front Controller - Class that invokes calls on the model, and displays an appropriate view
B.View Helper - wrapper Classes that provide more control over how data is displayed
C.Factory - Classes that create the necessary JavaBeans given the type
D.Singleton - Class for which only a single instance exists and provides access to the database
Select 2 answers. (AB)

6.After several tasks are marked completed, the EASIEST way to remove those tasks from the Tasks view is to:
A.Double-click on the task icons in the editors.
B.Right-click on the tasks in the Tasks view and select Delete.
C.Right-click on a task in the Tasks view and select Delete Completed Tasks.
D.Right-click on the task icons in the editors and select Remove Tasks.
Select the best answer.(C)

7.Which of the following Server preferences in WebSphere Studio can NOT be enabled?
A.Only publish changed resources to the server.
B.Automatically restart servers when necessary.
C.Save all open resources before starting servers.
D.Automatically publish before starting servers.
Select the best answer. (C)

8.A developer is attempting to enter Load Orders of 2, 4, and 6 for three servlets using the web.xml editor. What might prevent the developer from accomplishing this task?
A.The servlet classes could not be found.
B.The Load-On-Startup checkbox was not selected.
C.The web.xml file is marked read-only.
D.The numbering for the load orders is incorrect.
Select the best answer.(B)

9.Which of the following can be used to export an EAR file?
A.Right-click an Enterprise Application in the Repository view and select Export EAR File.
B.Right-click an Enterprise Application associated with a specific server through the Server Configuration view and select Export EAR File.
C.Select File -> Export -> EAR File and choose the Enterprise Application from the dropdown list of enterprise applications.
D.Select an Enterprise Application in the J2EE Hierarchy view and click the Export EAR File button from the toolbar.
Select the best answer. (C)

10.When applying Profiling Filters, which of the following are TRUE?
A.Default filters take precedence over an individual profiling agent's filter settings.
B.An individual profiling agent's filter settings take precedence over the Default filters.
C.To include a subset of classes, you must first specify the subset to be included, and only then specify the larger set to be excluded.
D.To include a subset of classes, you must first specify the larger set to be included, and only then specify the subset set to be excluded.
Select the best answer.(C)

11.A developer joins a new department where they will be developing J2EE applications, but still needs to support the Java application they developed while in their previous job. What is the BEST way to completely separate the new J2EE projects from the existing Java projects in WebSphere Studio?
A.Use options under the File menu to load the desired projects as necessary.
B.Load all the projects into the workspace and configure each with a unique name.
C.Name the projects with a scheme that distinguishes them from each other.
D.Separate the projects into two workspaces, one for each department's codebase.
Select the best answer.(D)

12.Which of the following properties can be controlled from the Java Project Properties dialog?
A.Classpath Variables
B.Code Formatting
C.Javadoc Location
D.The Server to launch for testing
Select 2 answers.(AC)

13.The BEST approach to excluding particular resources from version control management systems for all projects is to:
A.Create a matching resource pattern in the Ignored Resources section of the Team Preferences.
B.Remove the resources from the repository.
C.Add the resource to the .cvsignore file.
D.Move the resources to a project which has not been shared with a version control management system.
Select the best answer. (A)

14.In the Java Editor, the Quick Fix facility can offer correction proposals for the following types of problems:
A.Unused imports.
B.Unused methods.
C.Non-externalized strings.
D.Unreachable breakpoints.
E.Unreachable code.
Select 3 answers.(ACE)

15.Which of the following represents good practice when writing web applications which use JDBC 2.0 DataSources?
A.Obtain the DataSource in the init method of a Servlet and store it in an instance variable.
B.Obtain a Connection in the init method of a Servlet and store it in an instance variable.
C.Do not explicitly close Connections, but instead allow the DataSource to manage the connection pool.
D.Cache ResultSets by storing a reference in the HttpSession.
E.Use Statements rather than PreparedStatements to simplify application logic.
Select the best answer.(A)

16.While debugging an application, a developer notices that some of the variables in the Variables view are displayed in red text, instead of the normal black text. What is the significance of the red text?
A.The variable forms part of the condition in a Java Line Breakpoint.
B.The variable value changed during the last stepping operation.
C.The variable has an invalid value, as defined by its properties.
D.The variable is about to be assigned a new value.
Select the best answer.(B)

17.A developer is using JavaScript content assist. An item in the list of possible inclusions has a question mark ("?") preceding it. What does this mean?
A.Further help is available to describe the item.
B.The item needs to be imported.
C.The item may not be supported by the browser.
D.The item does not have a valid definition.
Select the best answer.(D)

18.A web developer uses the Page Designer Format -> Paragraph menu options to change the:
A.heading level only
B.heading text only
C.heading level and heading text
D.heading into another paragraph style
Select the best answer.(A)

19.It is required that the content listing for a directory on the web server can never be viewed through the browser. It is also required that whenever a requested file is not found, a generic error page (called error.jsp) be displayed to the user. Which of the following actions must the web developer perform to fulfill these requirements?
A.In the ibm-web-ext.xmi editor, make sure "Directory browsing enabled" is false.
B.In the ibm-web-ext.xmi editor, make sure "File serving enabled" is false.
C.In the web.xml editor, associate error page "\error.jsp" with error code 404 on the Pages page.
D.In the web.xml editor, associate error page "\error.jsp" with exception type java.io.FileNotFoundException on the Pages page.
Select 2 answers. (AC)

20.After opening the Type Hierarchy of the LoginServlet, which extends SimpleServlet (which extends HttpServlet), the doPost() method is selected. The BEST way to determine whether the LoginServlet's doPost() overrides any of the superclasses' doPost() methods is for the developer to click:

A.Show All Inherited Members
B.Show Overridden Methods
C.Show Supertype Hierarchy
D.Show Superclass Methods
Select the best answer(C)

21.When creating a Java Project, resources that can be added to the build path via the Libraries tab are:
A.Projects
B.Folders
C.Packages
D.JAR files
E.Classpath Variables
Select 3 answers.(BDE)

22.A developer needs to deploy the web pages from a Web project to a local web server (not to an application server). The BEST way to deploy these files directly to the web server is to:

A.use the ZIP Export utility to export the Web project as a ZIP file, and unzip the files in the web server directory
B.use the WAR Export utility to export the Web project to the web server
C.use the FTP Export utility to export the web application resources to the web server
D.use the File system Export utility to export the web application resources to the web server
Select the best answer.(D)

23.Which of the following are valid trace strings for WebSphere Application Server?

A.com.ibm.ws.*=all=enabled
B.*=startStop=true
C.entryExit=full=enabled
D.*=debug=enabled
E.com.ibm.ws.classloader.JarClassLoader=event=true
F.com.ibm.ws.runtime.* = error = enabled
Select 2 answers. (AD)

24.A developer is attempting to collect performance data from an Enterprise Application that is running on a remote Application Server. What steps are required to properly set up the environment so this task can be performed?

A.Run WebSphere Studio on the local machine.
B.Run WebSphere Studio on the remote machine.
C.Run the IBM Agent Controller on the local machine.
D.Run the IBM Agent Controller on the remote machine.
Select 2 answers.(AD)

25.When Action Sets are added to a perspective from the Window -> Customize Perspective menu item, they may be visible as:

A.Workbench level menu items
B.Workbench level toolbar buttons
C.View specific menu items
D.Editor specific toolbar buttons
Select 2 answers.(AB)

26.Here is a list of open source projects. Which one would be described as follows: "This is a development framework which encourages J2EE application architectures based on the Model-View-Controller (MVC) design paradigm"?

A.Struts
B.JUnit
C.Cactus
D.Tomcat
E.Eclipse
Select the best answer.(A)

27.A developer is examining the output of data collected from Profiling a poorly performing application in WebSphere Studio. While looking in the Sequence Diagram View, the developer discovers a dark red rectangle in the left side of the view adjacent to a method call. The MOST likely cause for this poor performance is:

A.a large amount of time elapsed while executing the method.
B.memory is being leaked in this method.
C.a large number of threads were created in this method.
D.a large amount of memory was consumed in this method.
Select the best answer.(A)

28.While debugging a web application on a remote instance of WebSphere Application Server, a developer modifies a JSP and saves the changes. What MUST the developer do so that the WebSphere Application Server recognizes the changes?

A.Clear the JSP cache directory.
B.Restart the WebSphere Application Server.
C.Reload the page in the browser.
D.Recompile the JSP.
E.Republish the web application to the remote server.
Select 2 answers.(CE)

29.Before JSTL tags can be used in a JSP, what must the developer do?

A.prerequisite Struts tag libraries must be inserted, including the HTML and session libraries.
B.the tags must be described using XML in a Tag Library Descriptor file.
C.a taglib directive such as <%@ taglib uri="http//java.sun.com/jstl/core" prefix="c" %> must be inserted, such as by using the Page -> Page Properties menu option from the Page Designer.
D.a jstl directive such as <%@ jstl uri="http//java.sun.com/jstl/core" prefix="c" %> must be inserted, such as by using the Page -> Taglib menu option from the Page Designer.
Select 2 answers.(BC)

30.If a Web Project references a JAR file that is located outside of WebSphere Studio, which of the following actions will make the JAR file available to both the Web project during development and the application server during testing?

A.Add this JAR file as an external JAR in Web project properties.
B.Add a classpath variable pointing to the JAR file.
C.Import the JAR file into the workbench as a Java Project.
D.Import the JAR file into the Web project's Web Content/WEB-INF/lib folder.
E.Import the JAR file into an associated Enterprise Application project.
Select the best answer.(D)

31.While debugging a web application in the WebSphere Test Environment, a developer modifies a JSP and saves the changes. What step MUST the developer take so that the WebSphere Test Environment server recognizes the changes, assuming all preferences have their default values?

A.Clear the local JSP cache.
B.Restart the server.
C.Recompile the JSP.
D.Reload the page in the browser.
Select the best answer.(D)

32.Which of the following can be used to export an EAR file?

A.Right-click an Enterprise Application in the Repository view and select Export EAR File.
B.Right-click an Enterprise Application associated with a specific server through the Server Configuration view and select Export EAR File.
C.Select File -> Export -> EAR File and choose the Enterprise Application from the dropdown list of enterprise applications.
D.Select an Enterprise Application in the J2EE Hierarchy view and click the Export EAR File button from the toolbar.
Select the best answer.

33.The deployment descriptor for a Web project is an XML file stored in the:

A.META-INF directory that defines the location of configuration files to be used by the production server
B.project root context directory that defines the location of configuration files to be used by the production server
C.WEB-INF directory that defines the configuration of modules to the production server
D.project root context directory that defines the configuration of modules to the production server
Select the best answer.(C)

34.Which of the following accurately describes the process of completely updating a project when moving a Java class from one package to another?

A.Dragging and dropping the class to the new package and choosing to update the references. Invoke Organize Imports to fix import statements.
B.Dragging and dropping the class to the new package and choosing to update the references.
C.Dragging and dropping the class to the new package, providing the name of the destination package and choosing to update the references.
D.Selecting Refactor->Move on the context menu of the class, providing the name of the destination package and choosing to update the references.
Select 2 answers.

35.When adding a JAR file to a Web project's manifest classpath via the Java Jar Dependencies of the project properties dialog, which of the following statements are TRUE?

A.The dependent JAR file must be in the Web Project's associated Enterprise Application Project.
B.The dependent JAR file must be in the Web Project.
C.The dependent JAR file is included in EAR file.
D.A Java Project can be directly added as a dependency module.
Select 2 answers.(AC)

36.Which of the following views BEST supports viewing the modules of an enterprise application and working with their deployment descriptors?

A.J2EE Navigator
B.Packages
C.J2EE Hierarchy
D.Modules
E.Application
Select the best answer. (C)

37.After several tasks are marked completed, the EASIEST way to remove those tasks from the Tasks view is to:

A.Double-click on the task icons in the editors.
B.Right-click on the tasks in the Tasks view and select Delete.
C.Right-click on a task in the Tasks view and select Delete Completed Tasks.
D.Right-click on the task icons in the editors and select Remove Tasks.
Select the best answer.(C)

38.A developer wishes to test two different applications which have different server configuration requirements using a WebSphere v5.0 Test Environment server. What is the BEST way to accomplish this?

A.Make the appropriate changes to the server configuration and restart the server before testing each application.
B.Create a server configuration for each application, and switch between them using the Switch Configuration option in the Server Configuration View.
C.Create two servers with a shared configuration and start the appropriate server before testing each application.
D.Create a server configuration for each application, and switch between them in the Server Configuration section of the projects' properties.
Select the best answer.(B)

39.It is required that the content listing for a directory on the web server can never be viewed through the browser. It is also required that whenever a requested file is not found, a generic error page (called error.jsp) be displayed to the user. Which of the following actions must the web developer perform to fulfill these requirements?

A.In the ibm-web-ext.xmi editor, make sure "Directory browsing enabled" is false.
B.In the ibm-web-ext.xmi editor, make sure "File serving enabled" is false.
C.In the web.xml editor, associate error page "\error.jsp" with error code 404 on the Pages page.
D.In the web.xml editor, associate error page "\error.jsp" with exception type java.io.FileNotFoundException on the Pages page.
Select 2 answers.(AC)

40.After completing a Java search to find the occurrences of the constructor of a given class, several matches are listed in the Search view. Possible ways to view where the constructor is being used are:

A.Use the Show Previous Match and Show Next Match buttons on the Search View toolbar.
B.Use the Show Previous and Show Next buttons on the Workbench toolbar.
C.Open the file to the method listed in the Location column.
D.Right-click on a match and select Go To File.
E.Double-click on the match.
Select 3 answers.(ADE)

41.Which of the following can be "automatically created" by using the JUnit TestCase wizard:
A.getters and setters
B.setUp() and tearDown() method stubs
C.test method stubs for methods in the test class
D.assert statements
E.TestRunner statements for text ui
Select 3 answers.(BCE)

42.While stepping over a method call, a breakpoint is encountered and the debugger suspends execution. The following information about the current thread is displayed in the Debug view: Thread [main] (Suspended(exception
java.lang.ArrayIndexOutOfBoundsException)) ---> DebugExample.testMethod() line: 12 ---> DebugExample.main(java.lang.String[]) line: 4 Which of the following could have caused the breakpoint to trigger?

A.A Java Exception Breakpoint was set for
"java.lang.ArrayIndexOutOfBoundsException".
B.A Java Line Breakpoint was set on line 4 of main().
C.A Method Entry Breakpoint was set for the class
"java.lang.ArrayIndexOutOfBoundsException".
D.A Java Line Breakpoint was set on line 12 of testMethod().
Select the best answer.

43.Due to strict coding standards imposed by a corporate standards book, import statements must be organized in a particular order. The MOST efficient way to do this would be to:

A.Use Organize Imports from the context menu, then reorder them in the Outline view. Application Developer "remembers" your ordering preferences as you set them.
B.Use Organize Imports from the context menu, after altering the order of the package types on the Order tab of the Project's Java Build Path.
C.Use Organize Imports from the context menu, after altering the order of the package types in the Window -> Preferences -> Java -> Organize Imports.
D.Use Format from the context menu, after altering the order of the package types on the Order tab of the Project's Java Build Path.
E.Use Format from the context menu, after altering the order of the package types in the Window -> Preferences -> Java -> Code Formatter.
Select the best answer.(C)

44.The Service Locator Design Pattern can be used to simplify the development of web applications. Which of the following BEST describes this pattern?

A.A Service Locator abstracts access to resources provided through JNDI and provides a single point of control.
B.A Service Locator provides a way of searching the network for a required service.
C.A Service Locator automatically moves business logic to under-utilized servers to improve overall application performance.
D.A Service Locator provides a directory service which can be used to look up objects with a key.
Select the best answer.(A)

45.Filters can be applied to a data connection for what purpose?

A.Restricting tables included in the generated data model
B.Restricting the data that is returned by any SQL statement executed against the connection
C.Setting limits on the maximum result set size returned via the connection
D.Setting limits on the number of concurrent queries that can be executed against the connection
Select the best answer.(A)

46.A developer finds no available versions when attempting to perform a Compare With -> Local History on a project file. What are the likely causes?

A.The date when file was last saved was before the number of days specified to maintain local history in the Workbench Local History Preferences.
B.The file has been edited more times than the maximum number specified in the Workbench Local History Preferences.
C.The maximum file size specified in the Workbench Local History Preferences has been exceeded.
D.A connection to the repository associated with the file's project cannot be established.
Select 2 answers.(AC)

47.While debugging an application, a developer notices that some of the variables in the Variables view are displayed in red text, instead of the normal black text. What is the significance of the red text?

A.The variable forms part of the condition in a Java Line Breakpoint.
B.The variable value changed during the last stepping operation.
C.The variable has an invalid value, as defined by its properties.
D.The variable is about to be assigned a new value.
Select the best answer.(B)

48.While writing a scriptlet in a JSP, a web developer realizes that the same scriptlet is likely to be used frequently in other JSPs. The scriptlet contains many lines and is included inline in the JSPs. In this situation, a developer can leverage the Content Assist features by:

A.customizing the JSP scriptlet macro
B.using the Quick-Copy Feature to duplicate the scriptlet
C.creating a new macro with the required content
D.adding it to the Favorites Page in the Tasks View.
Select 2 answers. (AC)

49.Web components forming part of a J2EE 1.3 Enterprise Application are being debugged using the WebSphere V5.0 Test Environment. For the server to reload modified components automatically while debugging, reloading must be enabled using which editor?

A.The WebSphere Test Environment Server Configuration editor.
B.The Web Deployment Descriptor editor.
C.The Application Deployment Descriptor editor.
D.The Servlet/JSP Properties editor.
Select the best answer. (B)

50.During performance analysis and stress testing, it is found that the amount of free heap space is reduced after each garbage collection. When the application is stress tested over long periods, the JVM eventually terminates with an OutOfMemoryError. Which of the following is MOST likely to lead to a solution to this problem?

A.Check application code for incorrect use of collection classes leading to memory leaks.
B.Check that DataSources have been correctly configured to automatically clean up unused connections.
C.Check that the web container has not been configured to keep HTTP connections alive.
D.Check application code for objects being created during a Servlet init method and not removed in the destroy method.

Select the best answer.(A)

51.Which of the following methods can NOT be "automatically generated" through the context menu or wizards within the Java perspective?

A.Inherited abstract methods
B.Inherited concrete methods
C."main" methods
D.Getters and setters
Select the best answer.(B)

如有异议, 欢迎讨论.
(To 版主: 不知能不能加分, 夜夜都在想论坛的资料, 只可惜我有的资料, 论坛都有, 真不知如何做贡献. 稍后我会准备IBM287, IBM340的模拟题, 谢谢!)

52.When using the Insert Bean option to insert a <jsp:useBean> tag in order to declare a JavaBean from within Page Designer, the default value of the Scope attribute is "(Default)". This default value represents:
A.request
B.page
C.session
D.application
Select the best answer.

53.When creating a server for remote testing on WebSphere Application Server, a developer MUST specify:

A.the path to the remote server configuration file.
B.the server's cell names.
C.a file transfer mechanism.
D.the JVM configuration parameters.
Select the best answer.

54.The following files provide registration functionality for a web application: - Register.jsp (a form for users to submit data) - Result.jsp (to display the registration outcome) - a Servlet class to act as an application controller - a view JavaBean Other classes provide business logic and data persistence. Where is the BEST location for placing the initial breakpoint in order to trace the flow through the application for the Registration path?

A.Register.jsp
B.Results.jsp
C.The controller Servlet
D.The database access class
E.The view JavaBean
Select the best answer.

55.Which of the following CAN be hidden from view in the Outline view of the Java perspective?
A.Static methods
B.Class fields
C.Instance variables
D.Import Statements
Select 2 answers.

56.A developer always wants to edit Java files using an editor other than the one supplied with WebSphere Studio. What is the BEST way, if any, for this to be accomplished?

A.Editing files outside of the WebSphere Studio environment cannot be easily setup.
B.Use the Java -> Java Editor option of the "Preferences" dialog.
C.Edit files on the file system using the editor of choice. Then use the "Refresh from local" option to incorporate the changes in WebSphere Studio
D.Use the Workbench -> File Associations option of the "Preferences" dialog to associate .java files with the preferred editor.
Select the best answer.

57.A developer is writing a web application and wishes to retrieve some information from a relational database, using JDBC, before presenting the user with a series of options as a web page. What would be the BEST location for the JDBC code?

A.In a Servlet, which would create a JavaBean from the results of the query and pass them to a JSP for display.
B.In a JSP scriptlet within a JSP, which would be invoked directly by the user from the browser.
C.In a JavaBean, which would be instantiated and invoked by a Servlet and then passed to a JSP for display.
D.In a custom tag implementation class, which would be called in a JSP to generate the list of options.
Select the best answer.

58.Which of the following Server preferences in WebSphere Studio can NOT be enabled?

A.Only publish changed resources to the server.
B.Automatically restart servers when necessary.
C.Save all open resources before starting servers.
D.Automatically publish before starting servers.

59.In a web application, a Customer JavaBean is used to store information about a particular user. The bean is used by multiple servlets and JSPs as the user interacts with the application. Which is the BEST context (or scope) to use for storing the JavaBean?

A.Application
B.Page
C.Session
D.Request
E.Response

Select the best answer.

60.The Run operations when applied to a .sql file in WebSphere Studio allow a developer to apply a DDL script to all of the following entities EXCEPT:

A.A remote database
B.A local database
C.Imported tables within WebSphere Studio
D.A database or schema model within WebSphere Studio
Select the best answer.

61.Which of the following are defined in a Server Configuration?

A.Build path
B.Server status
C.MIME type mappings
D.Class path
E.Ports

Select 3 answers.

2.Re:IBM 286 模拟题 [Re: slacker] Copy to clipboard
Posted by: wsjcert
Posted on: 2004-06-03 00:46

very useful

I have deleted the following 2 short messages -- why
wjiyong : hao
kevinyq : good


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923