0

web technology Online Quiz - 89

Description: web technology Online Quiz - 89
Number of Questions: 20
Created by:
Tags: web technology
Attempted 0/20 Correct 0 Score 0

On invoking a Web Service, you have received response XML. You need to process this XML document to update the details in the database.

  1. JAXP

  2. JAXR

  3. UDDI

  4. JSSE


Correct Option: A

An existing J2EE Application has following features: Uses a custom made MVC framework using Servlet as controller, JSP as view. JSP has a lot of scriptlet code. It also uses stateless session bean as a facade calling entity beans. You have been asked to migrate this application to a Java EE server. Which of the following technologies would you choose? Select two choices.

  1. JSF

  2. JCA

  3. Java EE Entities

  4. JMS


Correct Option: A,C

An existing J2EE application is hosted on 4 WebServers and 3 Application Servers. Due to increase in the no. of users, it has been planned to increase the count to 5 Web Servers and 4 Application Servers. Which of the following is negatively impacted? Choose one answer.

  1. Availability

  2. Performance

  3. Manageability

  4. Maintainability


Correct Option: C

You have been recruited by MegaSoft Inc. to help on a new sales project. Your role within the project team is as the lead architect. Given the requirements set out below, what type of transaction management should you use? MegaSoft Inc. is launching worldwide sports betting site. The unique feature of this betting site is that all bets are spread across multiple sporting events with huge potential prizes. For example, a user may bet $25 on Manchester United beating Real Madrid 4-0, Brazil winning the world cup,and Australia winning the cricket world cup. If a user gets three or more bets correct and one wrong then they will take home a 50% cut of the original stake. Choose one answer.

  1. Container Managed Transactions

  2. Bean Managed Transactions

  3. Container Transactions

  4. Bean Transactions


Correct Option: B

Which J2EE technology would you use to replace Perl/PHP scripts in the solution described below? MegaSoft Inc. has a web-based legacy business-to-business sales system. The solution consists of Perl and PHP scripts (presentation and business logic) and a MSSQL database. Customers logon to the site, browse for the latest products and prices, and place orders with MegaSoft. Choose one answer.

  1. Applets

  2. JSP

  3. JSP/Servlets

  4. JSP/Servlets and EJBs

  5. You would never replace PHP scripts with a J2EE technology


Correct Option: D

Which of the following describes UDDI? Choose one answer.

  1. It is a fundamental

  2. It is a platform-independent, XML-based registry for businesses worldwide to be listed on the Internet.

  3. It is a bidirectional pull parser interface for streaming XML processing.

  4. It provides a convenient way to bind an XML schema to a representation in Java code.


Correct Option: B

Your company has acquired ABC Company and will be building infrastructure for the merged entity. Now, You have a variety of mainframe applications, client server applications, and standalone programs that need to be integrated. Which of the following will provide a unified platform for scalable, secure SOA development? Choose one answer.

  1. JAXB

  2. JAXR

  3. Enterprise Service Bus

  4. Simple Object Access Protocol

  5. REST


Correct Option: C

An existing J2EE 1.3 application provides online stock quotes to the users. The web page refreshes every 60 seconds to show the latest stock prices. Customer is planning to add some minor features to this site and requested you for tips to improve the current features with minimal costs. Which of the following would you recommend? Choose one answer.

  1. Recode the application using JSF, EJB and Entities. This will improve the overall performance of the application and also improves maintainability

  2. Replace the auto-refresh functionality with AJAX code.

  3. Recode the application using JSF, EJB and Web Services.

  4. Use frames and put the auto-refresh part in a different frame.


Correct Option: B

ABC Bank provides facility to transfer amounts from one account to another through its internet banking application. It also provides facilities for its consumer clients to upload payments in one-go through a file upload facility. File upload is a very resource-intensive operation which may take 3-10 minutes. Currently on submitting the file it displays an alert message and processes the request. Often the browser times out. What would be your suggestion to improve this situation at minimal cost? Choose one answer.

  1. Remove the file upload feature from Internet Banking application

  2. Limit the no. of payments in upload files to minimum so that the overall request does not take more than 1 minute. Encourage customer to break the files and upload multiple times.

  3. Use AJAX to display progress bar displaying the % complete figures.

  4. Use JSF to reduce the processing times.


Correct Option: C

Which of the following technologies can be used to describe RESTful Webservices? Choose one answer.

  1. WSDL

  2. ebXML

  3. UDDI

  4. None of the above.


Correct Option: D

You are writing a web based utility that searches for existing web services provided by large companies. Your website searches these webservice, displays list and provides features through a very nice GUI to execute these webservices. In future, this utility can be enhanced to perform similar functionality for other enterprise services and need to be UI-rich. Which of the following APIs would you use for searching XML registries? Choose one answer.

  1. StaX

  2. JAXP

  3. JAXB

  4. JAXR


Correct Option: D

Your company is responsible for storing the credit history of citizens of ABC country. The government proposes that all financial institutions before lending must ensure that the candidate has a minimum credit score. Which of the following would you choose to build this service? Choose one answer.

  1. Build the service as a EJB

  2. Build the service as a web service

  3. Build the service as an IIOP Object.

  4. Implement it as a JMS based service.


Correct Option: B

ABC company has a very old web application that was built on Servlets, JSP and a simple proprietary MVC framework which they must use. This application is mostly used for reporting purposes and retrieves data from DB2 through JDBC. They are planning to enhance the functionality of the application and also deploy on a Java EE application server. They approached you for suggestions to improve the application code. Which of the following would not be a valid recommendation (best-fit)? Choose one answer.

  1. Refactor the common scriptlet code into tag libraries wherever possible

  2. Create a common look & feel using templates, CSS files.

  3. Use Entities

  4. Use Expression Language


Correct Option: C

ABC Company has decided to migrate existing J2EE application built using servlets, JSP, JMS, session & entity Beans to Java EE. They have approached you for recommendations. Which of the following are valid recommendations? Select two choices. Choose at least one answer.

  1. Replace entity beans with JPA entity classes

  2. Use the new JMS API

  3. Replace session Beans with web services

  4. Use JCA


Correct Option: A,B

You are architecting a new web based labor claim management application. Currently the users have a Java Swing-based application running on their local PCs, and you want to implement the new web-based solution with a GUI that is similar to their desktop application. Once the users have filled in their hours then you must send the details to central labour system through a Web service. What of the following technologies would be required for building this application? (Choose two.) Choose at least one answer.

  1. JAX-WS

  2. JMS

  3. JSSE

  4. JCE

  5. JSF


Correct Option: A,E

AI Explanation

To answer this question, you need to understand the different technologies and their relevance to building a web-based labor claim management application. Let's go through each option to understand why A and E are the correct answers:

Option A) JAX-WS - This option is correct because JAX-WS (Java API for XML Web Services) is a Java technology used for building web services. Since the requirement is to send the labor claim details to a central labor system through a web service, JAX-WS would be required to implement and consume the web service.

Option B) JMS - This option is incorrect because JMS (Java Message Service) is a messaging standard for Java applications. While it can be used for communication between different components of an application, it is not specifically required for the given requirement of sending labor claim details to a central labor system through a web service.

Option C) JSSE - This option is incorrect because JSSE (Java Secure Socket Extension) is a Java technology used for implementing secure network communication. While security is an important aspect of any web application, it is not specifically required for the given requirement of building a web-based labor claim management application.

Option D) JCE - This option is incorrect because JCE (Java Cryptography Extension) is a Java technology used for implementing cryptographic services. While encryption and decryption might be required for securing sensitive data, it is not specifically required for the given requirement of building a web-based labor claim management application.

Option E) JSF - This option is correct because JSF (JavaServer Faces) is a Java web application framework used for building user interfaces. Since the requirement is to implement a web-based solution with a GUI similar to the existing Java Swing-based application, JSF would be a suitable technology for building the user interface.

Based on the explanations above, the correct answers are A (JAX-WS) and E (JSF). These technologies are required for building the web-based labor claim management application with a GUI similar to the existing desktop application and for sending the labor claim details to the central labor system through a web service.

A variable $word is set to “HELLO WORLD”, which of the following script returns in title case?

  1. echo ucwords(strtolower($word)

  2. echo ucwords($word)

  3. echo ucfirst(strtolower($word)

  4. echo ucfirst($word)


Correct Option: A
Explanation:

To solve this question, the user needs to know PHP string functions and the concept of case conversion.

  • ucwords(): This function converts the first character of each word in a string to uppercase.
  • strtolower(): This function converts a string to lowercase.
  • ucfirst(): This function converts the first character of a string to uppercase.

Option A: echo ucwords(strtolower($word)) - This option converts the string to lowercase using strtolower() function and then converts the first character of each word in the string to uppercase using ucwords() function. This will return the string in title case.

Option B: echo ucwords($word) - This option converts the first character of each word in the string to uppercase using ucwords() function. This will not convert the string to lowercase and therefore will not return the string in title case.

Option C: echo ucfirst(strtolower($word)) - This option converts the string to lowercase using strtolower() function and then converts the first character of the string to uppercase using ucfirst() function. This will not convert the first character of each word in the string to uppercase and therefore will not return the string in title case.

Option D: echo ucfirst($word) - This option converts the first character of the string to uppercase using ucfirst() function. This will not convert the first character of each word in the string to uppercase and therefore will not return the string in title case.

Therefore, the correct option is:

The Answer is: A. echo ucwords(strtolower($word))

The difference between include() and require()

  1. are different how they handle failure

  2. both are same in every aspects

  3. is include() produced a Fatal Error while require results in a Warning

  4. none of above


Correct Option: A

AI Explanation

To answer this question, we need to understand the differences between the include() and require() functions in PHP.

Option A) The options are different in how they handle failure - This option is correct.

The main difference between include() and require() lies in how they handle failure.

  • include() function: If the file specified in the include() statement is not found or there is an error during the inclusion process, a warning will be issued, but the script will continue to execute. This means that the rest of the code will still be processed.

  • require() function: If the file specified in the require() statement is not found or there is an error during the inclusion process, a fatal error will be issued, and the script will terminate immediately. This means that the remaining code will not be executed.

Option B) Both are the same in every aspect - This option is incorrect. include() and require() have different behavior when it comes to handling failure.

Option C) Is include() produced a Fatal Error while require() results in a Warning - This option is incorrect. The statement in this option is reversed. include() produces a warning, while require() results in a fatal error.

Option D) None of the above - This option is incorrect. The correct answer is option A, as explained above.

Therefore, the correct answer is option A) The options are different in how they handle failure.

Which of the following is NOT done with JavaScript ?

  1. Form Validation

  2. RGB Colors

  3. Browser Detection

  4. RGB Value


Correct Option: B

AI Explanation

To answer this question, you need to understand the capabilities and functionalities of JavaScript. Let's go through each option to understand why it is correct or incorrect:

Option A) Form Validation - This option is correct because JavaScript can be used to validate form inputs and ensure that the data entered by the user is in the correct format.

Option B) RGB Colors - This option is incorrect because JavaScript can be used to manipulate and generate RGB colors. It can be used to dynamically change the color of elements on a webpage.

Option C) Browser Detection - This option is correct because JavaScript can be used to detect the user's browser and perform specific actions based on the browser type.

Option D) RGB Value - This option is correct because JavaScript can be used to manipulate and retrieve RGB values. It can be used to extract and modify individual color components of an RGB value.

The correct answer is B) RGB Colors. This option is incorrect because JavaScript can indeed be used to work with RGB colors.

It is usually advisable to keep as much JavaScript as possible in which section ?

  1. Head

  2. Layer

  3. Body

  4. Title


Correct Option: A

AI Explanation

To answer this question, you need to understand the structure of an HTML document and the role of JavaScript.

JavaScript is a programming language commonly used for adding interactivity and dynamic functionality to a website. It can be included within an HTML document using the `` tag.

Now let's go through each option to understand why it is correct or incorrect:

Option A) Head - This option is correct. Placing JavaScript in the <head> section of an HTML document is usually advisable. This allows the JavaScript code to be loaded and executed before the content of the webpage is rendered. It is especially useful when the JavaScript code needs to manipulate or interact with elements in the HTML document.

Option B) Layer - This option is incorrect. The term "layer" does not correspond to any specific section in an HTML document. It is not a recommended location for JavaScript code.

Option C) Body - This option is incorrect. Placing JavaScript in the <body> section of an HTML document is possible but not usually advisable. The JavaScript code will be loaded and executed after the content of the webpage is rendered. This can lead to delays in the execution of the JavaScript code and may cause issues with accessing or manipulating elements in the HTML document.

Option D) Title - This option is incorrect. The <title> tag is used to define the title of an HTML document. It is not a suitable location for JavaScript code.

The correct answer is A) Head. Placing JavaScript code in the <head> section of an HTML document is usually advisable as it allows the code to be loaded and executed before the content of the webpage is rendered.

JavaScript lines end with what

  1. comma

  2. semicolon

  3. colon

  4. Bracket


Correct Option: B

AI Explanation

To answer this question, we need to understand the syntax of JavaScript.

In JavaScript, statements or lines of code are typically terminated with a semicolon (;). This is used to indicate the end of the statement and separate multiple statements on the same line. The semicolon is a crucial component of JavaScript syntax and is used to avoid any potential ambiguity or errors.

Let's go through each option to understand why they are correct or incorrect:

Option A) Comma - This option is incorrect because commas are not used to end lines in JavaScript. Instead, commas are used to separate items in a list or arguments in a function.

Option B) Semicolon - This option is correct because semicolons are used to terminate statements and end lines in JavaScript.

Option C) Colon - This option is incorrect because colons are typically used for object property assignments and in JavaScript's ternary operator, but they are not used to end lines.

Option D) Bracket - This option is incorrect because brackets (either curly brackets {} or square brackets []) are used for grouping code blocks, defining arrays, or creating objects, but they are not used to end lines.

Therefore, the correct answer is B) semicolon. This option is correct because semicolons are used to terminate statements and end lines in JavaScript.

- Hide questions