Java Web Programming and HTTP
Test your knowledge of Java web development including servlets, JSP, WAR files, and HTTP protocols
Questions
Question 1 Multiple Choice (Single Answer)
What is the syntax for declaring a variable
- <%! %>
- <%= %>
- <% %>
- None of the above
Question 2 True/False
Page directive can be declared as <%@ page attributeName="values" %> True or False
- True
- False
Question 3 Multiple Choice (Single Answer)
Name the http method that sends the same response as the request. Select the one correct answer
- DEBUG method
- OPTIONS method
- TRACE method
- HEAD method
Question 4 Multiple Choice (Single Answer)
The location where compiled class files will be present within a war file?
- /WEB-INF/classes
- /classes
- /META-INF/classes
- /root/classes
Question 5 Multiple Choice (Single Answer)
Name the method defined in the HttpServletResponse class that may be used to set the content type?
- setResponseContentType
- setContent
- setContentType
- setType