Quiz
- How constructor can be used for a servlet?
- Initialization
- Constructor function
- Initialization and Constructor function
- Setup() method
- Can servlet class declare constructor with ServletConfig object as an argument?
- True
- False
- What is the difference between servlets and applets?
- Which of the following code is used to get an attribute in a HTTP Session object in servlets?
- session.getAttribute(String name)
- session.alterAttribute(String name)
- session.updateAttribute(String name)
- session.setAttribute(String name)
- Which method is used to get three-letter abbreviation for locale’s country in servlets?
- Request.getISO3Country()
- Locale.getISO3Country()
- Response.getISO3Country()
- Local.retrieveISO3Country()
- Which of the following code retrieves the body of the request as binary data?
- DataInputStream data = new InputStream()
- DataInputStream data = response.getInputStream()
- DataInputStream data = request.getInputStream()
- DataInputStream data = request.fetchInputStream()
- When destroy() method of a filter is called?
- The destroy() method is called only once at the end of the life cycle of a filter
- The destroy() method is called after the filter has executed doFilter method
- The destroy() method is called only once at the begining of the life cycle of a filter
- The destroyer() method is called after the filter has executed
- Which of the following is true about servlets?
- Servlets execute within the address space of web server
- Servlets are platform-independent because they are written in java
- Servlets can use the full functionality of the Java class libraries
- Servlets execute within the address space of web server, platform independent and uses the functionality of java class libraries
- How is the dynamic interception of requests and responses to transform the information done?
- servlet container
- servlet config
- servlet context
- servlet filter
- Can servlet class declare constructor with ServletConfig object as an argument?
- True
- False
No comments:
Post a Comment