1. SessionIDs are stored in cookies.
2. What is the maximum size of cookie?
3. How can we invalidate a session?
Correct Answer is : session.invalidate()
4. Which method creates unique fields in the HTML which are not shown to the user?
Correct Answer is : HTML Hidden field
5. Which object is used by spring for authentication?
Correct Answer is : SecurityContextHolder
6. How does applet and servlet communicate?
Correct Answer is : HTTP Tunneling
7. In CGI, process starts with each request and will initiate OS level process.
8. Which class provides system independent server side implementation?
Correct Answer is : ServerSocket
9. What happens if ServerSocket is not able to listen on the specified port?
Correct Answer is : IOException is thrown when opening the socket
10. What does bind() method of ServerSocket offer?
Correct Answer is : binds the serversocket to a specific address (IP Address and port)
11. Which of the below are common network protocols?
Correct Answer is : TCP and UDP
12. Which class represents an Internet Protocol address?
Correct Answer is : InetAddress
13. What does local IP address start with?
Correct Answer is : 10.X.X.X, 172.X.X.X, or 192.168.X.X
14. What happens if IP Address of host cannot be determined?
Correct Answer is : UnknownHostException is thrown
15. What is the java method for ping?
Correct Answer is : isReachable()
16. Servlet are used to program which component in a web application?
Correct Answer is : server
17. Which component can be used for sending messages from one application to another?
18. How are java web applications packaged?
Correct Answer is : both jar and war
19. How can we connect to database in a web application?
Correct Answer is : JDBC template
20. How can we take input text from user in HTML page?
Correct Answer is : input tag