Describe how a servlet can process AJAX requests using GET and POST methods.
- Both doGet and doPost methods
- Use a separate servlet for AJAX
- Use only doGet method
- Use only doPost method
A servlet can process AJAX requests using both the doGet and doPost methods. The choice depends on the nature of the AJAX request and the type of data being sent. Using both methods allows flexibility in handling various types of AJAX requests within the same servlet.
Loading...
Related Quiz
- How do you differentiate between checked and unchecked SQL exceptions?
- In what scenarios is CallableStatement preferable over PreparedStatement?
- Which caching strategy involves storing frequently accessed data in memory for quick retrieval?
- What are the implications of using optimistic vs. pessimistic locking strategies in database transactions?
- The _________ method is used to retrieve cookies from the request object.