Quiz
Questões - Introduction to Java Servlets - Test
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (18)
1How many HTTP Methods can be implemented in a Servlet?
- A7
- B8
- C9
- D6
2The HttpServlet class methods (doGet, doPost, doDelete, doHead) are: (Select one Option)
- APublic
- BAbstract
- CProtected
- DPrivate
3Name two valid Http methods: (Select two options)
- ADeleting
- BDelete
- COpt
- DTrace
4Which of the following statements are not true? (Select two options)
Java Servlets:- Aare plataform dependant
- Bare scalable
- Chave less overhead
- Dare not portable
5HttpServlet is:
- AClass
- BInterface
- CMethod
- DField
6What is the correct signature of getParameterValues() method?
- Aint[] getParameterValues(String)
- BString[] getParameterValues(String)
- Cint getParameterValues(String)
- Dfloat[] getParameterValues(String)
7The getInputStream method returns:
Please select:- AServletInputStream
- BServletOutputStream
- CHttpServletInputStream
- DHttpServletOutputStream
8startAsync() is a valid method in the Servlet Request interface:
Please select:- ATrue
- BFalse
9State which estatements are true.
Select two options:- AThe setHeader method allows multiple values for a particular header
- BThe addHeader method allows multiple values for a particular header
- CThe setHeader method replaces the old value if already present
- DThe addHeader method replaces the old value if already present
10The sendRedirect method works on the server side
- ATrue
- BFalse
11In the ServletResponse interface, the method that is used to write character data is:
- AgetPrintWriter()
- BgetWrite()
- CsetWriter()
- DgetWriter()
12Which statements are true about the sendRedirect() method?
Select two options.- AWe can use the sendRedirect method after commiting the response.
- BWe cannot use the sendRedirect method after commiting the response.
- CThe sendRedirect method takes a String object as its parameter
- DThe sendRedirect method takes an URL object as its parameter
13What is the setContentType(String) method in ServletResponse used for?
- ATo tell the server what type of information you are sending.
- BTo tell the container what type of information you are sending.
- CTo tell the client what type of information you are sending.
- DThere is no such method in the ServletResponse interface
14How many stages are there in a Servlet Life Cycle?
- A4
- B5
- C6
- D3
15State which of the following statements are true:
Select two options:- AThe init method may be overridden
- BThe service method should be overridden
- CThe service method should not be overridden
- DThe init method may not be overridden
16When a servlet is instantiated:
- AThe constructor that we write for the servlet runs.
- BThe compiler supplied default no-arg constructor runs.
- CThe compiler supplied default constructor with arguments runs.
- DNone of the above.
17There is / are _____ ServletConfig per ______
- AOne / Web application
- BTwo / Servlet
- COne / Servlet
- DTwo / Web application
18Multiple requests from clients run on:
- ASame thread.
- BHave two threads and rotate them.
- CDifferent threads for all of them.
- DNone of the above.
Information
- Description
- Concursos Públicos Desenvolvimento de Software (OCEJWCD 6 ONLINE COURSE) Quiz on Questões - Introduction to Java Servlets - Test, created by Luis Felipe Guariento on 14/01/2018.
- Author
- Luis Felipe Guariento
- Language
- Português
- Views
- 0
- Tags
- Rating
- No ratings yet Rate this quiz