• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

IBM 157 ICE Sample Exam Answers

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
IBM ICE Sample Exam 157 Questions/Answers
==Workbench Basics (6/6)==
1) Which of the following views BEST supports understanding the structure of an Enterprise Application?
a) Navigator
b) Package
**c) J2EE
d) Data
e) Application
==Workbench Basics==
2) 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) configure the web server in the Server perspective, associate the Web project with the server instance, then publish to the server
b) use the WAR Export utility to export the Web project to the web server
c) use the FTP Export utility to export the webApplication folder to the web server
**d) use the File system Export utility to export the webApplication folder to the web server
==Workbench Basics==
3) When Action Sets are added to a perspective from the Perspective - > Customize 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
==Workbench Basics==
4) A web developer wants to work with multiple Application Developer workspaces. The developer would like to start Application Developer by dragging a selected workspace folder on to the Application Developer desktop icon. How should the properties of the desktop shortcut be configured to support this behavior?
a) Configure the "Start in" entry to the folder containing the workspace.
b) Replace the default contents of the "Target" to point to the root directory containing the workspaces for your projects.
**c) Add the "-data" parameter to the end of the default "Target" properties.
d) Associate the ".WAD" file extension with the wsappdev.exe executable file.
==Workbench Basics==
5) A web developer wants to ensure that HTML and JSP files contain no spelling errors. The web components are being developed in a language other than the default Application Developer installation. How would the developer configure Application Developer to use the correct language?
**a) Use the Web Tools- >Dictionary option of the "Preferences" dialog to select the "Language" used in the files.
b) Use the Workbench- >Dictionary option of the "Preferences" dialog to select the appropriate "Dictionary" file for the language used in the files.
c) Set the "Dictionary" option in the "Properties" dialog of the Web project.
d) The correct dictionary language is automatically selected from the Operating System's "Locale" setting.
==Workbench Basics==
6) A developer who is just beginning to use Application Developer wants to learn how to use the tool to develop and test servlets. What is the BEST help view to use for retrieving this information?
a) Tasks view
b) By feature view
c) J2EE View
d) Search view
**e) By type view
==Application Development Best Practices (3/3)==
7) If a JavaBean contains a particular user's information and will be used by multiple servlets and JSPs, under which context should the JavaBean be placed?
a) Application
b) Page
**c) Session
d) Request
e) Response
==Application Development Best Practices==
8) A web application is stress tested and found to have very poor performance when persistent sessions are enabled. The MOST likely cause of this behavior is:
a) having many direct references stored in the HttpSession
b) mapping an HttpSession to a single database row
c) disabling the session cache
**d) having large object graphs stored in the HttpSession
==Application Development Best Practices==
9) A web application with extensive connectivity to back-end relational data is performing very poorly. Which of the following application architecture changes will MOST likely lead to the best throughput improvement?
**a) Use JDBC 2.0 DataSource(s) to access connection pooling services from the web container.
b) Use EJBs instead of JDBC to access the relational data.
c) Use more distinct servlets to control access to the relational data.
d) Use fewer distinct servlets to control access to relational data.
==Java Development (11/11)==
10) 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.
==Java Development==
11) 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
==Java Development==
12) When editing the Properties dialog of a Java project, the purpose of setting the "Build output folder" field on the Source page of the Java Build Path section is to specify the:
a) default folder into which JAR files for that project will be exported
b) default folder into which an entire Java project will be exported
**c) folder where the class files are placed when Java source code is compiled
d) folder where resources specified in the build path are kept within the tool before deployment
==Java Development==
13) How is the priority of a Task set?
a) Double-click a Task to launch the Tasks Property dialog and choose the priority from the "Priority" dropdown list.
b) Right-click a Task and select Properties to launch the Tasks Property dialog and choose the priority from the "Priority" dropdown list.
c) Right-click a Task and select Set Priority and then High, Normal, or Low.
**d) Click the "!" column of a Task and select High, Normal, or Low from the dropdown list.
==Java Development==
14) 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.
==Java Development==
15) 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 Inherited Members
b) Show Overridden Methods
c) Show Supertype Hierarchy
**d) Lock View and Show Members in Hierarchy
==Java Development==
16) After successfully searching for a reference to a method, the file containing the method is opened in a Java editor. There are errors in the method. In most situations, in order to determine the nature of the errors without switching from the Search view to the Tasks view, the developer could:
**a) Hover over an Error icon.
b) Double-click on an Error icon.
c) Right-click on an Error icon and select Show Error.
d) Place the cursor in the line above an error and click the Go to Next Problem button on the toolbar. The error will be highlighted and hovering over it will give you the description.
**e) Place the cursor in the line above an error and click the Go to Next Problem button on the toolbar. The error will be highlighted and the description will display in red in the status bar at the bottom.
==Java Development==
17) Which of the following CAN be hidden from view in the Outline view of the Java perspective?
**a) Private methods
**b) Public fields
c) Public methods
d) Import Statements
==Java Development==
18) The ONLY types of methods that can be "automatically generated" through the context menu or wizards within the Java perspective are:
a) Public methods
b) Private methods
**c) "main" methods
**d) Getters and setters
**e) Inherited abstract methods
==Java Development==
19) Refactoring a class in the Outline view allows a developer to:
**a) rename the class
b) rename the class and change the package it is in
c) change the package it is in and edit its import statements
d) change it from a public class to a private class and visa versa
==Java Development==
20) While creating the following simple Java class, which of the following constructs COULD content assist complete successfully?
public class ClassA {
boolean variable = false;
public void setCompleted() {
variable = true;
}
public boolean isCompleted() {
return variable;
}
}
a) public, void, true, false, variable
b) public, void, boolean, true, false
c) class, variable, return
**d) boolean, void, variable
e) class, true, false, return
==Web Development (14/14)==
21) If a Web Project references a JAR file that is located outside of Application Developer, 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 Application Developer workbench as a Java Project.
*d) Import the JAR file into the Web Project webApplication/WEB-INF/lib folder.
e) Import the JAR file into an associated Enterprise Application Project.
==Web Development==
22) 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
==Web Development==
23) 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) Set the directoryBrowsingEnabled attribute to false in the ibm-web-ext.xmi file.
b) Set the fileServingEnabled attribute to false in the ibm-web-ext.xmi file.
**c) Add the following entry to the web.xml file
<error-page>
<error-code>404</error-code>
<location>/error.jsp</location>
</error-page>
d) Add the following entry to the web.xml
<error-page>
<exception-type>java.io.FileNotFoundException</exception-type>
<location>/error.jsp</location>
</error-page>
==Web Development==
24) Warning messages are added to the Tasks view while editing a web.xml file using the web.xml editor in Application Developer. This happens when the developer specifies:
a) A non-existent file in the < welcome-file-list >
**b) A non-existent file in the < error-page >
**c) A non-existent class in the < servlet-class > element
d) An invalid value for the < error-code > element
==Web Development==
25) In Application Developer, a web developer uses the Page Designer Heading Editor tool to change the:
**a) heading level only
b) heading text only
c) heading level and heading text
d) heading into another paragraph style
==Web Development==
26) After entering Load Orders of 2,4 and 6 for three servlets using the web.xml editor, a developer observes that these values are not reflected in the web.xml file. A possible reason for this behavior is that:
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.
==Web Development==
27) While developing a web application, it is required that certain portions of a dynamic web page (a JSP) should be displayed only to persons with a certain role (for example, manager). Which of the following is the BEST way of implementing this requirement?
a) Write simple scriptlets that perform a check before displaying the section
<% if(userRole.equals("manager")) { %>
Total Sales = <%=salesNum%>
<% } %>
**b) Use tag libraries to perform the check
<x:checkAccess role="manager">
Total Sales = <%=salesNum%>
</x:checkAccess>
c) Perform the verification in the controller and redirect accordingly
if(userRole.equals("manager")) {
// Forward to JSP A
} else {
// Forward to JSP B
}
d) Create a small helper JSP that can be included in any JSP using jsp:include
<jsp:include
<jsp:include page="checkAccessPage.jsp"/>
e) Create a role called manager and configure access to the JSP using the Security features of the web.xml file
==Web Development==
28) A web developer creates a Web Project, and a Java Project as a Utility Project. During the early development stages when the code in both projects change frequently, what actions are necessary in order to make the Utility Project available to the Web Project in both the development and testing stages?
**a) Select the Utility Project as a required project in Web Project properties.
**b) Add the Utility Project into the classpath in the server instance configuration.
c) Modify the web.xml to include the utility project.
d) Modify the associated Enterprise Application Project to include the Utility Project as a module.
==Web Development==
29) Which of the following directory structures reflects the structure of a newly created Web project when the "Create CSS File" checkbox was checked?
a) /webApplication/source /webApplication/classes /webApplication/lib /webApplication/css
**b) /source /webApplication/WEB-INF/classes /webApplication/WEB-INF/lib /webApplication/theme
c) /source /webApplication/WEB-INF/classes /webApplication/WEB-INF/lib /webApplication/css
d) /webApplication/source /webApplication/WEB-INF/classes /webApplication/lib /webApplication/WEB-INF/theme
==Web Development==
30) A developer wants to import image files to an enterprise application from an external file system. All the image files will be deployed to a J2EE application server. In Application Developer, where should the developer create the folder to hold the image files?
a) Under the root folder of the Web Project
b) Under the root folder of the Enterprise Application Project
c) Under the root folder of the Java Project
**d) Under the webApplication folder in the Web Project
==Web Development==
31) 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 of Application Developer 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.
==Web Development==
32) When adding a JAR file to a Web Project's manifest classpath via the Edit Module Dependencies context menu, 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.
==Web Development==
33) When using the Insert Bean option to insert a < jsp:useBean > tag in order to declare a JavaBean from within Application Developer Page Designer, the default value of the Scope attribute is "(Default)". This default value represents:
a) request
**b) page
c) session
d) application
==Web Development==
34) Which file or property must be modified in order to create (or add) a new Java source file folder associated with a Web project?
a) application.xml
b) web.xml
**c) Web Project properties
d) Web Project classpath
==Running Applications (4/4)==
35) A WebSphere Remote Server instance and configuration were created using the appropriate information about the remote WebSphere Application Server. During the creation process the FTP file transfer mechanism was selected. What is the sequence of steps that would successfully start the remote server from Application Developer?
**a) Start the Agent Controller on the remote machine, start the FTP server on the remote machine, and start the remote server instance from Application Developer.
b) Start the Agent Controller on the remote machine, start the FTP server on the local machine, and start the remote server instance from Application Developer.
c) Start the FTP server on the local machine, start the remote server instance from Application Developer, and start the Agent Controller on the remote machine.
d) Start the FTP server on the local machine, start the Agent Controller on the local machine, and start the remote server instance from Application Developer.
==Running Applications==
36) What is the purpose of defining a classpath variable?
a) To add libraries to the Workspace
**b) To provide an easy method of adding the locations of JAR files to a project's Java Build Path
c) To define configuration information about the classpath such as order and preference
d) To use individual classes as libraries that are not packaged in JAR files
==Running Applications==
37) Which of the following are Server preferences in the Workbench that can be turned on or off?
**a) Run on Server action starts the server in debug mode.
**b) Switch to the Server perspective when a server starts.
c) Save all open resources before starting servers.
**d) Automatically publish before starting servers.
e) Only publish modified resources to the server.
==Running Applications==
38) Which of the following are ways to export an EAR file?
**a) Right-click an Enterprise Application in the Navigator view on ANY perspective 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 view and click the Export EAR File button from the toolbar.
e) Right-click an Enterprise Application in the Repository view and select Export EAR File.
==Debugging (8/8)==
39) The New Java Scrapbook Page wizard prompts the user to specify:
a) an existing Server Project
**b) an existing Java or Web Project
**c) a filename
d) dependent projects
e) the name of the Test Server
==Debugging==
40) A web application uses a customized logging class to perform status tracing. Tracing can be turned on or off using this class. This class uses "System.out.println" statements to output status messages. While the web application is running under Application Developer's WebSphere Test Environment, where would these status messages be logged?
a) .log
b) stderr.txt
**c) trace.log
d) stdout.txt
e) LogingUtil.log
==Debugging==
41) Execution is suspended at a method entry breakpoint to which a hit count has been applied. In this situation, a developer can:
a) Modify existing breakpoints in the Display view.
b) Examine the stack trace in the Log view.
c) Examine variable values from past iterations.
**d) Re-enable the method entry breakpoint.
==Debugging==
42) When using Application Developer as a remote debugging client, which of the following statements accurately reflect the debugging configuration?
a) The debugger is run on the remote machine.
b) The program is run on the local machine.
**c) Program control is done from the local machine.
**d) Internal program behavior is observed from the local machine.
e) The debugger daemon runs on the local machine.
==Debugging==
43) During a local debugging session, a developer makes changes to an application and the test environment. Which of the following will require a restart of the WebSphere Application Server?
a) Modifying the servlet to use a different Data Source object
**b) Modifying the JNDI name of the Data Source object used for connection pooling
c) Modifying the usebean tag in a JSP to use a different Java class
**d) Changing Session Tracking from URL Rewrite to Cookies
e) Changing the mechanism for storing user information from the HttpSession object to the database
==Debugging==
44) A developer starts the test server in debug mode. In which cases will the Debugger be automatically triggered?
a) A "System.out.println" statement is executed.
**b) A statement with a breakpoint is reached.
c) The program requires user input.
d) The program terminates without any runtime errors.
==Debugging==
45) While debugging a JSP, which of the following statements is TRUE about variable and stack information?
a) No variable or stack trace information is available.
b) Variable and stack trace information correspond to the generated HTML stream.
**c) Variable and stack trace information correspond to generated Java servlet.
d) Variable and stack trace information correspond to the JSP source.
==Debugging==
46) 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) ---> ArrayIndexOutOfBoundsException.() line: 35
---> Stepping.testMethod() line: 11
---> Stepping.main(String[]) line: 4
What caused the breakpoint to trigger?
a) A Java exception breakpoint was set for "java.lang.ArrayIndexOutOfBoundsException" with the "Caught" option selected.
b) A Java exception breakpoint was set for "java.lang.ArrayIndexOutOfBoundsException" with the "Uncaught" option selected.
**c) A method entry breakpoint was added to "java.lang.ArrayIndexOutOfBoundsException"
d) A line entry breakpoint was added to "java.lang.ArrayIndexOutOfBoundsException"
==Profiling Applications (3/3)==
47) The principal use of the Object References view of the Profiler in Application Developer is to determine:
a) possible problems with concurrency
**b) possible problems with memory leaks
c) the calling sequence between classes and methods
d) the timing relationships between classes and methods
==Profiling Applications==
48) 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.
==Profiling Applications==
49) A developer is attempting to collect performance data from an Enterprise Application that is running on a remote Application Server. What steps are required in order to properly setup the environment so this task can be performed?
**a) Run Application Developer on the local machine.
b) Run Application Developer on the remote machine.
c) Run the IBM Agent Controller on the local machine.
**d) Run the IBM Agent Controller on the remote machine.
==Data (3/3)==
50) The execute operation on a .sql file in Application Developer allows a developer to apply a DDL script to which of the following entities?
a) A remote database
b) A local database
c) Imported tables within Application Developer
**d) A database or schema model within Application Developer
==Data==
51) Which of the following artifacts can be generated by the SQL to XML wizard against a SQL select statement?
**a) XML
**b) HTML
**c) XML Schema
d) JSP
**e) XSL
f) XSD
==Data==
52) 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
==Team (6/6)==
53) A developer is ready to release code changes related to a new feature for the next product release. The current Stream contents have not yet been versioned, and bug fixes are still needed. Which of the following are necessary to avoid pollution of the development Stream?
**a) Before releasing new changes, perform a Catch up operation with the current Stream.
**b) Release to a new Stream.
c) Perform a three-way compare and merge the changes in the workspace; then Release to the Stream.
d) Version the Stream contents, then Release to the Stream.
==Team==
54) The primary purpose of performing a "Catch up" operation with the Stream is to:
a) load new resources from the local file system into the workspace
b) obtain versioned resources from the Stream
c) add changes from the Workspace to the Stream
**d) obtain changes that others have made to the resources
==Team==
55) 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 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.
**e) The file has been Synchronized with the Stream, and no subsequent saved changes have occurred.
==Team==
56) How can a developer who has set up multiple repositories in Application Developer ensure that, prior to synchronizing with the Stream, the correct Stream will be used?
a) Select Team-- >Show in Resource History to display Stream information for the selected project.
**b) Select the Team page of the associated Project Properties, and change the stream if necessary.
c) Select the Team page of the associated Resource Properties, and change the stream if necessary.
d) Highlight the appropriate Stream in the Repositories pane just prior to starting the synchronization.
==Team==
57) At which level may workspace resources be explicitly versioned?
a) file
b) folder
**c) project
d) workspace
e) any level
==Team==
58) Team members are using different drive letters or directories for their Application Developer installations. In this situation, what is the MOST effective method of referring to external JAR files in the Build Path?
a) Move the JAR files to a specific location agreed to by the team.
b) Add the location to the Project References for each project using the JAR files.
c) Keep the JAR files in the repository and refer to them there.
**d) Create a classpath variable containing the location of the Workspace, and use the variable when specifying the path to the JAR files.
[ October 11, 2002: Message edited by: Michael Robinet ]
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a few questions about why your answers were correct.
40) A web application uses a customized logging class to perform status tracing. Tracing can be turned on or off using this class. This class uses "System.out.println" statements to output status messages. While the web application is running under Application Developer's WebSphere Test Environment, where would these status messages be logged?
a) .log
b) stderr.txt
** c) trace.log
d) stdout.txt
e) LogingUtil.log
I can find nothing in the documentation to support this answer (c) in fact I have found the following in the Viewing Logs Help topic:
"The log is stored as the file LoggingUtil.log under the workspace's .metadata directory". I have found a LoggingUtil.log in my .metadata directory.

46) 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) ---> ArrayIndexOutOfBoundsException.() line: 35
---> Stepping.testMethod() line: 11
---> Stepping.main(String[]) line: 4
What caused the breakpoint to trigger?
a) A Java exception breakpoint was set for "java.lang.ArrayIndexOutOfBoundsException" with the "Caught" option selected.
b) A Java exception breakpoint was set for "java.lang.ArrayIndexOutOfBoundsException" with the "Uncaught" option selected.
** c) A method entry breakpoint was added to "java.lang.ArrayIndexOutOfBoundsException"
d) A line entry breakpoint was added to "java.lang.ArrayIndexOutOfBoundsException"

How does the stack trace diffentiate between option c and d?

51) Which of the following artifacts can be generated by the SQL to XML wizard against a SQL select statement?
** a) XML
** b) HTML
** c) XML Schema
d) JSP
** e) XSL
f) XSD
What is the difference between and XSD file and and XML Schema?

Thanks for any clarification you can add on these three questions.
Roger
 
reply
    Bookmark Topic Watch Topic
  • New Topic