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
-
Create a JVM for applets.
-
Extending a web server by providing dynamic web content.
-
Storing information in applets.
-
Loading buttons and menus.
B
Correct answer
Explanation
Servlets are Java programs that run on a web server or application server, handling client requests to generate dynamic web content. Unlike static HTML pages, servlets process incoming requests (typically HTTP), interact with databases or other back-end systems, and produce customized responses. Options A and C incorrectly associate servlets with applets, which are client-side Java programs, while option D describes GUI components, not server-side functionality.
-
The server has a built-in JVM.
-
The browser has a built-in JVM.
-
The source code is interpreted by the browser.
-
Applets don''t need a JVM.
B
Correct answer
Explanation
Java applets could run in almost any browser because browsers either had a built-in JVM or a Java plugin that provided the JVM runtime environment. The JVM within the browser would execute the applet's bytecode, making it platform-independent. Option A incorrectly places the JVM on the server, while option C is wrong because browsers don't interpret Java source code. Option D is incorrect because applets definitely require a JVM to execute.
-
The server has a built-in JVM.
-
The browser has a built-in JVM.
-
The source code is interpreted by the browser.
-
Applets don''t need a JVM.
B
Correct answer
Explanation
Java applets run in browsers because browsers include a Java Virtual Machine (JVM) or Java plug-in that executes the applet bytecode. The JVM provides the runtime environment necessary for applets to function within the browser's security sandbox. Modern browsers no longer support applets due to security concerns.
-
main method.
-
start method.
-
init method.
-
run method
C
Correct answer
Explanation
When an applet is loaded, the browser calls the init() method first, similar to a constructor. This initializes the applet's state and resources before it becomes visible. The start() method is called after init() when the applet should begin execution. There's no standard main() or run() method in the applet lifecycle.
-
An interactive website
-
A Java program that is run through a web browser
-
A type of computer
-
Java method
B
Correct answer
Explanation
An applet is a small Java program designed to run within a web browser, typically embedded in HTML pages. It executes in a sandboxed JVM environment with restricted security permissions. Applets were commonly used for client-side web applications before being deprecated in favor of modern web technologies.
-
Extending a web server by providing dynamic web content.
-
Create a JVM for applets.
-
Storing information in applets.
-
Loading buttons and menus.
A
Correct answer
Explanation
Servlets are Java programs that extend a web server's capabilities by generating dynamic web content in response to HTTP requests. They run on the server side, processing requests and producing HTML or other responses. This makes them ideal for web applications, form processing, and database interactions.
-
Create a JVM for applets.
-
Extending a web server by providing dynamic web content.
-
Storing information in applets.
-
Loading buttons and menus.
B
Correct answer
Explanation
This is a duplicate of question 151540 with options in different order. Servlets extend web server functionality by generating dynamic content in response to HTTP requests. They are server-side Java components used for web applications, processing forms, and interacting with databases to produce customized responses for each client request.
-
The server has a built-in JVM.
-
The browser has a built-in JVM.
-
The source code is interpreted by the browser.
-
Applets don''t need a JVM.
B
Correct answer
Explanation
Java applets can run in browsers because browsers include (or used to include) a built-in JVM or Java plugin that can execute Java bytecode. The browser provides the runtime environment needed to execute the applet code securely. Option A is incorrect - the server doesn't run the applet, the client browser does. Option C is wrong - browsers don't interpret Java source code directly. Option D is false - applets require a JVM to execute.
-
In Cache
-
Cookies
-
In Global variable
-
URL Strings
B
Correct answer
Explanation
ASP.NET stores session IDs in cookies by default, allowing the server to identify users across HTTP requests. Option B is correct - cookies are the default storage mechanism for session IDs. Options A, C, and D represent alternative storage methods but are not the default behavior.
-
Yes
-
No
-
May be
-
None of the above
B
Correct answer
Explanation
IIS (Internet Information Services) is not required to develop ASP.NET 2.0 web applications. You can develop and test ASP.NET applications locally using the built-in ASP.NET Development Server (Cassini) or Visual Studio's built-in web server without needing IIS installed on your development machine.
-
Java Software Programming
-
JavaScript Server Program
-
Java Server Program
-
Java Server Programming
D
Correct answer
Explanation
JSP stands for Java Server Pages, which is a technology for creating dynamic web content using Java. It is not related to JavaScript Server Program or Java Server Program.
-
System.Net.HttpClient
-
System.Net.WebClient
-
Sytem.Net.InetClient
-
Sytem.Net.SoapClient
B
Correct answer
Explanation
WebClient provides HTTP functionality for accessing websites in .NET. HttpClient is modern but not available in older .NET versions, while InetClient and SoapClient are not valid .NET classes for web access.
-
To store the global information and variable definitions for the application
-
Configures the time that the server-side codebehind module is called
-
To configure the web server
-
To configure the web browser
A
Correct answer
Explanation
The Web.config file is the primary configuration file for ASP.NET applications, used to store application-level settings, connection strings, custom errors, and global variables. While it can configure IIS web server settings locally, its primary role is managing application configurations rather than the general web browser or server.
-
Serialization
-
WindowsPrincipal
-
WindowsDataset
-
None of above
B
Correct answer
Explanation
When Windows authentication is enabled in ASP.NET, the current request gets a WindowsPrincipal object attached to it via HttpContext.User. This object represents the Windows security context and identity of the user making the request. Option C is incorrect - WindowsDataset is not a security object, and serialization is unrelated to authentication.
-
J2EE application Server and also an HTTP web server
-
Core application server
-
com++ server
-
Open tool
A
Correct answer
Explanation
BEA WebLogic (now Oracle WebLogic Server) is a J2EE application server that also functions as an HTTP web server. It provides a complete runtime environment for enterprise Java applications. The other options (com++ server, Open tool) are incorrect.