Wad(Web Site And A Web Application)

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Paool_bws
P
Paool_bws
Community Contributor
Quizzes Created: 1 | Total Attempts: 502
| Attempts: 502 | Questions: 31
Please wait...
Question 1 / 31
0 %
0/100
Score 0/100
1. 30. What is an application server? 

Explanation

An application server is a middleware that specializes in managing software components. It provides services to these components based on the requirements of the application that utilizes them. Additionally, it supplies business logic for distributed applications that are spread across different platforms. An application server is designed to handle various aspects of a business system and typically consists of two components: a server for enterprise components and a HTTP/HTTPS server for web components.

Submit
Please wait...
About This Quiz
Web Development Quizzes & Trivia

This quiz titled 'WAD(Web site and a Web application)' explores the distinctions between websites and web applications, communication protocols between servers and clients, and the technical setup for web applications using Tomcat. It is targeted at learners to assess understanding of web development basics.

Personalize your quiz and earn a certificate with your name on it!
2. 29. What is a component model? 

Explanation

A component model refers to a set of contracts that establish the guidelines for developing and packaging components in a component-oriented model. These contracts define the expectations and requirements between the component and the system that will host it, ensuring consistency and interoperability. By adhering to these contracts, developers can ensure that components are developed and packed in a standardized manner, promoting reusability and modularity in software systems.

Submit
3. 31. What is a client-server (CS) communication? Enumerate at least 4 examples of CS communication. 

Explanation

not-available-via-ai

Submit
4. 25. Enumerate at least 7 features usually existent in business systems? 

Explanation

Business systems usually have several features that are typically present. These features include remote method invocation, which allows for communication between different components of the system. Concurrency is also important, as it allows for multiple tasks to be executed simultaneously. Load-balancing ensures that the workload is distributed evenly across multiple servers. Transparent fail-over ensures that if one component fails, another can take over seamlessly. Back end integration allows the system to connect with other systems or databases. Dynamic redevelopment allows for the system to be updated or modified without causing disruptions. Clean shutdown ensures that the system can be safely and properly shut down. Logging keeps a record of system activities for troubleshooting and auditing purposes.

Submit
5. 26. What is a distributed system?Distributed system is a collection of computers connected in a network with following characteristics: 

Explanation

A distributed system is a network of computers that are loosely coupled, meaning they are not tightly connected or dependent on each other. Each computer in the system is autonomous, meaning it can operate independently. The system is designed to be resilient, able to continue functioning even if some nodes or the network itself crashes. The nodes in the system can perform separate computations simultaneously, and the system operates asynchronously, meaning there is no strict timing or synchronization between nodes.

Submit
6. 27. A distributed system is transparent to (enumerate at least 5 characteristics): 

Explanation

A distributed system is transparent to various characteristics. Access transparency means that accesses to resources, whether local or remote, are uniform. Location transparency ensures that users cannot determine the location of resources. Migration transparency allows resources to move without changing their names. Replication transparency hides the existence of multiple copies of resources. Concurrency transparency enables multiple users to share resources automatically. Parallelism transparency allows activities to occur in parallel without the users' knowledge. Performance transparency ensures that the system's performance is hidden from the users. Failures transparency means that the system handles failures without the users being aware.

Submit
7. 12. Which circumstance would be a good reason to override the servlet's init method?

Explanation

The init method in a servlet is used to initialize the servlet before it handles any requests. It is called by the servlet container when the servlet is first loaded or when the container is restarted. By overriding the init method, you can customize the initialization process and set the initial state of the servlet using initialization parameters. This allows you to configure the servlet based on specific requirements or external configurations. Therefore, when you want to initialize the state of a servlet with initialization parameters, it would be a good reason to override the servlet's init method.

Submit
8. 28. Enumerate at least 4 services which the middleware of distributed systems can provide. 

Explanation

The middleware of distributed systems can provide several services, including Naming Service, Security Service, Transaction Service, Persistence Service, Event Service Message, and Queuing Service. These services are essential for managing and coordinating the communication and interactions between different components of a distributed system. The Naming Service allows components to locate and access each other by providing a centralized naming and directory service. The Security Service ensures the confidentiality, integrity, and authentication of data and communication within the system. The Transaction Service enables the execution of atomic and consistent operations across multiple components. The Persistence Service provides mechanisms for storing and retrieving data persistently. The Event Service Message allows components to publish and subscribe to events, facilitating asynchronous communication. Finally, the Queuing Service manages the queuing and delivery of messages between components, ensuring reliable and ordered communication.

Submit
9. 19. How are JavaBeans Components created?

Explanation

JavaBeans components are created with the jsp:useBean standard action. This action allows the developer to instantiate a JavaBean component and make it available for use in the JSP page. The jsp:useBean action specifies the class of the JavaBean component to be created and assigns a name to it. This allows the JSP page to access the properties and methods of the JavaBean component.

Submit
10. 21. In Model 1 architecture, JSP pages served as both the Controller and the View. What serves as the Controller in Model 2 architecture? 

Explanation

In Model 2 architecture, JSP pages are used as the View while Servlets serve as the Controller. Servlets handle the request from the client, perform necessary operations, and determine the appropriate response. They interact with the Model (Data Access Objects) to retrieve or update data and then forward the necessary information to the View (JSP pages) for rendering to the client. Therefore, Servlets act as the Controller in Model 2 architecture.

Submit
11. 13. What is the name of the object that represents a Web application at runtime?

Explanation

The ServletContext object represents a web application at runtime. It provides a way for the server to communicate with the servlets in the application and allows them to access resources, such as files and databases. The ServletContext object is created by the server when the application is deployed and is available to all servlets within the application. It is used to store and retrieve application-wide information and can be accessed using the getServletContext() method in the Servlet API.

Submit
12. 15. When a JSP page is translated, what is the result? 

Explanation

When a JSP page is translated, the result is Java servlet code. JSP pages are translated into servlets by the JSP container. The JSP container converts the JSP code into Java servlet code, which can then be executed by the web container. This allows the dynamic content of the JSP page to be processed and rendered by the server before being sent to the client.

Submit
13. 2. What do you call the communication that is sent from the client to the server? What do you call the communication that is sent from the server back to the client? 

Explanation

The communication that is sent from the client to the server is called a request, while the communication that is sent from the server back to the client is called a response.

Submit
14. 6. Which three attributes must be specified for each input tag in an HTML form? 

Explanation

The three attributes that must be specified for each input tag in an HTML form are NAME, TYPE, and VALUE. The NAME attribute is used to identify the input field, the TYPE attribute specifies the type of input field (e.g. text, checkbox, radio), and the VALUE attribute specifies the initial value of the input field. These attributes are essential for creating functional and interactive forms on a website.

Submit
15. 10. What methods are called by the Web container to control the life cycle of a servlet? 

Explanation

The Web container calls the init method when a servlet is first created, the service method to handle client requests, and the destroy method when the servlet is being removed from service. These three methods are responsible for controlling the life cycle of a servlet. The other options mentioned in the question (doGet, doPost, doDelete, start, init, paint) are not the methods called by the Web container for servlet life cycle management.

Submit
16. 9. How can your servlet retrieve form data from a request? 

Explanation

The servlet can retrieve form data from a request by using the getParameter method of the HttpServletRequest object. This method allows the servlet to retrieve the value of a parameter that was sent in the request. The parameter can be accessed using its name as a parameter to the getParameter method. This is the most common and recommended way to retrieve form data in a servlet. The other options mentioned in the question are not suitable for retrieving form data.

Submit
17. 7.How is form data transmitted in the GET request?

Explanation

Form data is transmitted in the GET request by sending name-value pairs in the header of the request after the URL. This means that the data is appended to the URL in the form of query parameters. This method is commonly used for simple and short data submissions, as the data is visible in the URL and can be bookmarked or shared easily. However, it is not suitable for transmitting large amounts of data or sensitive information, as it can be intercepted and seen by others.

Submit
18. 20. How does one JSP page call another JSP page? 

Explanation

One JSP page can call another JSP page using the jsp:forward standard action. This action allows the current JSP page to transfer control to another JSP page, and the output of the second JSP page will be included in the response sent back to the client. This is commonly used when one JSP page needs to include the content of another JSP page within its own page.

Submit
19. 8. Which object is created by the Web container so that each HTTP request can store the data from the request? 

Explanation

The Web container creates an HttpServletRequest object to store the data from each HTTP request. This object contains information about the request such as the request method, headers, parameters, and session information. It allows the server-side code to access and manipulate the data sent by the client in the request.

Submit
20. 4. When using the Tomcat server as your Web server, which directory should your deployed simple servlet class file be in to be functional? 

Explanation

The correct answer is /webapps/ROOT/WEB-INF/classes/package. When using the Tomcat server as the web server, the deployed simple servlet class file should be placed in this directory for it to be functional. The /webapps/ROOT directory is the default web application directory in Tomcat, and the WEB-INF/classes directory within it is where the compiled class files should be located. The "package" in the directory path refers to the package name of the servlet class.

Submit
21. 1. What is the difference between a Web site and a Web application? 

Explanation

The correct answer is that there is no difference between a website and a web application, as the terms are synonymous. This means that both terms refer to the same thing and can be used interchangeably.

Submit
22. 22. In Model 2 architecture, which type of object is used to verify HTML form data and to store domain objects in the request? 

Explanation

In Model 2 architecture, servlets are used to verify HTML form data and to store domain objects in the request. Servlets act as the controller in the architecture, handling the request from the client and interacting with the model and view components. They are responsible for processing the form data, performing validations, and storing the domain objects in the request scope for further processing. JSP pages are used for the view component, data access objects (DAO) are used for interacting with the database in the model component, and the HttpServletRequest object is used to encapsulate the client's request information.

Submit
23. 11. Which of the servlet life cycle methods should you call to handle a request? 

Explanation

The correct answer is "None." In a servlet, the service method is automatically called by the container to handle a request. This method, in turn, calls the appropriate doXXX method (such as doGet or doPost) based on the HTTP request method. The init method is called only once during the initialization of the servlet. Therefore, in order to handle a request, you do not need to manually call any of the servlet life cycle methods.

Submit
24. 18. Which important directive tag is used at the top of a JSP page to define properties for the entire page? 

Explanation

The page directive is used at the top of a JSP page to define properties for the entire page. It allows the developer to set various attributes such as the language used, the content type, session behavior, error handling, and more. This directive is specific to the JSP page and is not used in the deployment descriptor.

Submit
25. 23. In Model 2 architecture, which type of object is used to render the user interface and to access the domain objects? 

Explanation

In Model 2 architecture, JSP pages are used to render the user interface and access the domain objects. JSP pages allow for the separation of the presentation logic from the business logic, making it easier to maintain and update the user interface. They can also interact with the domain objects to retrieve and manipulate data. JSP pages provide a dynamic and interactive user interface for the application.

Submit
26. 14. How does your servlet go about accessing the ServletContext object? 

Explanation

The correct answer is "With the getServletContext method." This method is used to access the ServletContext object in a servlet. The ServletContext object represents the entire web application and provides information about the application's environment. It allows the servlet to interact with the web container and access resources such as files, databases, and other servlets. By using the getServletContext method, the servlet can retrieve the ServletContext object and perform various operations on it.

Submit
27. 16. What immediately happens to the Java servlet code that was translated from the JSP page? 

Explanation

The Java servlet code that was translated from the JSP page is compiled into a class file. This class file is then stored in the Web container, which is responsible for managing the execution of servlets. The Web container can then load and execute the servlet whenever it is requested by a client. The compiled class file is not sent to the browser, as the browser only receives the HTML output generated by the servlet.

Submit
28. 3. What are two possible HTTP request types, and what are the names of the servlet methods that handle them? 

Explanation

The correct answer is GET and POST, the doGet and doPost methods. In the HTTP protocol, GET and POST are two common request types. The doGet method is used to handle GET requests, which retrieve data from the server. The doPost method is used to handle POST requests, which send data to the server to be processed. These methods are commonly used in servlets, which are Java classes that handle server-side requests in web applications.

Submit
29. 24. How does the JSP page used for the View access the domain objects? 

Explanation

In Model 2 architecture, JSP pages should not directly access domain objects. Instead, they can access domain objects using the jsp:useBean standard action. This action allows the JSP page to create or retrieve a JavaBean object and make it available for use within the page. By using this action, the JSP page can access the properties and methods of the domain object and interact with it as needed.

Submit
30. 17. Which step must you complete to access the request object from a JSP page?

Explanation

The correct answer is "None. It is an implicitly defined variable." In a JSP page, the request object is automatically available without the need for any specific steps to access it. It is one of the implicit objects provided by the JSP container, along with other objects like response, session, application, etc. These objects can be directly accessed and used within the JSP page without any additional code or configuration. Therefore, there is no need to complete any specific step to access the request object in a JSP page.

Submit
31. 5. For an HTML form to send data successfully to a servlet, which two parameters must be specified in the form tag? 

Explanation

In order for an HTML form to send data successfully to a servlet, two parameters must be specified in the form tag. The action attribute must specify the relative URL to the target servlet, indicating where the data should be sent. The method attribute must specify whether the data should be sent using the GET or POST method. The GET method appends the form data to the URL, while the POST method sends the data in the body of the HTTP request.

Submit
View My Results

Quiz Review Timeline (Updated): Mar 20, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 20, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jun 07, 2016
    Quiz Created by
    Paool_bws
Cancel
  • All
    All (31)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
30. What is an application server? 
29. What is a component model? 
31. What is a client-server (CS) communication? Enumerate at least 4...
25. Enumerate at least 7 features usually existent in business...
26. What is a distributed system?Distributed system is a collection of...
27. A distributed system is transparent to (enumerate at least 5...
12. Which circumstance would be a good reason to override the...
28. Enumerate at least 4 services which the middleware of distributed...
19. How are JavaBeans Components created?
21. In Model 1 architecture, JSP pages served as both the Controller...
13. What is the name of the object that represents a Web application...
15. When a JSP page is translated, what is the result? 
2. What do you call the communication that is sent from the client to...
6. Which three attributes must be specified for each input tag in an...
10. What methods are called by the Web container to control the life...
9. How can your servlet retrieve form data from a request? 
7.How is form data transmitted in the GET request?
20. How does one JSP page call another JSP page? 
8. Which object is created by the Web container so that each HTTP...
4. When using the Tomcat server as your Web server, which directory...
1. What is the difference between a Web site and a Web...
22. In Model 2 architecture, which type of object is used to verify...
11. Which of the servlet life cycle methods should you call to handle...
18. Which important directive tag is used at the top of a JSP page to...
23. In Model 2 architecture, which type of object is used to render...
14. How does your servlet go about accessing the ServletContext...
16. What immediately happens to the Java servlet code that was...
3. What are two possible HTTP request types, and what are the names of...
24. How does the JSP page used for the View access the domain...
17. Which step must you complete to access the request object from a...
5. For an HTML form to send data successfully to a servlet, which two...
Alert!

Advertisement