A _______ distribution is a common probability distribution used in statistics, which is symmetrical and bell-shaped.
- Binomial
- Exponential
- Normal
- Poisson
A Normal distribution, also known as a Gaussian distribution, is symmetrical and bell-shaped. It is widely used in statistics to model various natural phenomena and forms the basis for many statistical methods.
In machine learning, what does 'overfitting' refer to?
- The model is too simple to capture patterns in the data
- The model perfectly fits the training data but fails to generalize to new data
- The model performs poorly on both training and test data
- The model performs well on training data but poorly on new, unseen data
Overfitting occurs when a model fits the training data too closely, capturing noise and specificities that don't generalize well to new, unseen data. This can result in poor performance on test data.
What is the primary purpose of the POST method in HTTP?
- To delete data
- To request data
- To retrieve data
- To send data
The primary purpose of the POST method in HTTP is to send data to the server, typically used for submitting form data and other complex data types.
When a web application is redeployed with updated servlet configuration in web.xml, how does it affect the running servlets?
- The redeployment process has no impact on running servlets.
- The running servlets are automatically updated with the new configuration.
- The running servlets need to be restarted to apply the new configuration.
- The updated configuration only applies to newly created servlet instances.
When a web application is redeployed with updated servlet configuration, the running servlets are not automatically updated. To apply the new configuration, the running servlets need to be restarted.
Which of the following is used to specify a servlet's name in the deployment descriptor?
The element in the web.xml file is used to specify the name of a servlet. This name is then referenced in various configurations within the deployment descriptor and is essential for identifying and managing the servlet within the web application.
Which one directly interacts with the Java server pages (JSP) container?
- CSS
- HTML
- JSP
- Servlets
Servlets directly interact with the JavaServer Pages (JSP) container.
A ________ is a unique identifier generated by the server and sent to the client to maintain a session.
- Cookie
- Session ID
- Token
- URL Rewriting
The term for a unique identifier generated by the server and sent to the client to maintain a session is a Cookie.
What is a significant difference in how session data is handled between RequestDispatcher's forward and HttpServletResponse's sendRedirect?
- Session data is duplicated
- Session data is lost
- Session data is modified
- Session data is shared
When using HttpServletResponse's sendRedirect, the session data is typically lost because it involves a new request. In contrast, RequestDispatcher's forward method allows the sharing of session data, maintaining it throughout the forwarding process, providing a more seamless user experience with consistent session information.
The _________ attribute specifies the subset of URLs to which a cookie will be sent.
- Domain
- Expires
- Path
- Secure
The Domain attribute specifies the subset of URLs to which a cookie will be sent.
The method __________ is used when the servlet needs to redirect the client to a different domain.
- forwardResponse
- redirectToDomain
- sendForward
- sendRedirect
The method sendRedirect is used when the servlet needs to redirect the client to a different domain.