Computer Knowledge

Java Enterprise and Web Technologies

2,279 Questions

Java enterprise and web technologies questions focus on J2EE architecture, web services like SOAP, and servlet functionalities. These topics frequently appear in IT officer and specialist scale examinations. Regular practice ensures familiarity with enterprise application components.

HttpServlet methodsSOAP and web servicesEJB architecture rolesJ2EE componentsJSP servlet callingUDDI concepts

Java Enterprise and Web Technologies Questions

Multiple choice .net
  1. an example of a distributed application.

  2. makes it easy to add new computers if demand increases.

  3. applies only to web servers.

  4. Both a and b.

  5. All of the above.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

A server farm is a distributed application architecture (multiple servers working together) and provides scalability by making it easy to add more computers. However, it's not limited to web servers - server farms can serve various applications, making 'Both a and b' correct.

Multiple choice .net
  1. Client side

  2. Server side

  3. Data side

  4. Both a and b.

  5. All of the above.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

To answer this question, the user needs to know the basic concepts and approaches to state management in web development.

State management refers to the manipulation, storage, and retrieval of data or information that is used to render a user interface. There are two main types of state management in web development: client-side and server-side.

Client-side state management refers to the storage and manipulation of data on the client-side or user's device, typically using JavaScript. This approach is useful for creating dynamic web pages that provide a more seamless user experience by reducing the need for server requests. Examples of client-side state management tools include Redux and React Context API.

Server-side state management refers to the storage and manipulation of data on the server-side or the web server. This approach is useful for managing large amounts of data and ensuring consistency across all client requests. Examples of server-side state management tools include Session and Cache.

Data-side state management refers to the storage and manipulation of data on a separate database server. This approach is useful for managing data that needs to be accessed by multiple servers or applications.

Now, let's go through each option and explain why it is right or wrong:

A. Client side: This option is a valid type of state management for the creation of web pages. Client-side state management is used to manage state on the client-side or user's device using JavaScript.

B. Server side: This option is a valid type of state management for the creation of web pages. Server-side state management is used to manage state on the server-side using tools like Session and Cache.

C. Data side: This option is not a valid type of state management for the creation of web pages. Data-side state management refers to the storage and manipulation of data on a separate database server.

D. Both a and b: This option is correct. Both client-side and server-side state management are valid types of state management for the creation of web pages.

E. All of the above: This option is incorrect because data-side state management is not a valid type of state management for the creation of web pages.

Therefore, the answer is: D. Both a and b.

Multiple choice .net
  1. on a web server.

  2. without information from a database.

  3. without knowledge of previous web pages.

  4. before a request from a client.

  5. on a client machine.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

To solve this question, the user needs to have a basic understanding of the HTTP protocol and how web pages are created and delivered.

The stateless HTTP protocol refers to the fact that each request from a client to a web server is independent and does not retain any knowledge of previous requests. This means that the server does not store any information about the client's previous interactions.

Now let's go through each option and determine if it is correct or incorrect:

A. on a web server: This option is incorrect. Web pages are hosted and served from web servers, but the stateless nature of the HTTP protocol does not specifically refer to where the web pages are created.

B. without information from a database: This option is incorrect. Web pages can be created with or without information from a database. The stateless nature of the HTTP protocol does not specifically relate to the use of a database.

C. without knowledge of previous web pages: This option is correct. The stateless nature of the HTTP protocol means that each request is independent and does not retain any knowledge of previous requests or web pages.

D. before a request from a client: This option is incorrect. Web pages are created and served in response to a request from a client. The stateless nature of the HTTP protocol does not refer to when the web pages are created.

E. on a client machine: This option is incorrect. Web pages are created and served from web servers, not on client machines. The stateless nature of the HTTP protocol does not relate to where the web pages are created.

Therefore, the correct answer is:

C. without knowledge of previous web pages.

Multiple choice .net
  1. Application states

  2. Session states

  3. Database support

  4. Both a and b.

  5. All of the above.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

ASP.NET provides both Application State and Session State as server-side state management techniques. Application State stores data accessible to all users across the application, while Session State stores user-specific data for individual sessions. Database support is a data persistence mechanism, not a server-side state management technique, so option D is correct.

Multiple choice .net
  1. when the application is first placed on a web server.

  2. when the web server is first started.

  3. when the first client requests a URL resource.

  4. every time a client requests a URL resource.

  5. every time a new client interacts with the web application.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

An Application variable is initialized when the first user requests any resource from the web application. It is not created when the code is placed on the server or when the server starts, but rather upon the first actual execution of the application's lifecycle.

Multiple choice .net
  1. when the application is first placed on a web server.

  2. when the web server is first started.

  3. when the first client requests a URL resource.

  4. every time a client requests a URL resource.

  5. every time a new client interacts with the web application.

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

Session variables are created when a new client first interacts with the web application, establishing a unique session for that user. The application's placement on the server or the web server's startup do not trigger session creation - sessions are user-specific. Every subsequent request from that same client uses the existing session; only new clients get new sessions.

Multiple choice asp
  1. a collection of values sent as cookies in a HTTP header

  2. a collection of data sent with a submitted form

  3. from client variables described from within an object

  4. from the OS module

  5. A&B

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

The ASP Request object retrieves user information through multiple collections: the Form collection (POST data) and the Cookies collection (HTTP cookie headers). Both are valid sources.

Multiple choice asp
  1. server

  2. response

  3. session

  4. All of the above

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

ASP has six built-in objects: Server, Response, Request, Session, Application, and ObjectContext. All three listed options (Server, Response, Session) are standard ASP objects.

Multiple choice asp
  1. server

  2. session

  3. request

  4. response

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The Abandon method belongs to the Session object and destroys the current user session, releasing all resources and stored variables. Server, Request, and Response objects do not have an Abandon method.

Multiple choice asp
  1. session

  2. request

  3. server

  4. response

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The MapPath method belongs to the Server object and converts virtual or relative paths to physical file system paths on the server, essential for file operations.

Multiple choice asp
  1. ASP does not depend upon which browser the viewer is using.

  2. ASP code does not show up in the source code; thus, the code is protected

  3. ASP does not download with the page to the viewer.

  4. ASP can easily interact with a database.

  5. All of the above

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

ASP offers multiple advantages: it's server-side so browser-agnostic (A), code executes on the server so source is hidden from browsers (B), it doesn't download to the client (C), and it has built-in database connectivity through ADO (D). All are valid advantages over client-side JavaScript, making 'All of the above' correct.

Multiple choice asp
  1. Client-side executable code (executes at the browser level)

  2. Server side executable code (runs at the server only)

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

JavaScript is primarily a client-side scripting language, meaning the code is sent to the user's web browser and executed there. While environments like Node.js exist for server-side execution, the fundamental definition in web development is client-side execution.

Multiple choice asp
  1. Client-side executable code (executes at the browser level)

  2. Server side executable code (runs at the server only)

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

ASP is server-side technology - code executes on the web server before any HTML is sent to the browser. The browser receives only the generated output, not the ASP source code. Client-side code (option A) like JavaScript runs in the browser after the page loads. This server-side execution is fundamental to how ASP works.

Multiple choice asp ado
  1. Connection object

  2. Connection string

  3. Both

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

When using the DSN connection method, your ASP code requires both a Connection object (instantiated with Server.CreateObject("ADODB.Connection")) and a connection string that references the DSN name. The Connection object holds the connection state, while the connection string tells the object which preconfigured DSN to use for the connection details.