Javaranch.com Question Bank ID : 51 Section 1 - The
Servlet Model
What is the result of compiling the above Servlet and accessing it by typing:
"http://www.javaranch.com/test/HelloServlet"
into the address field of a browser
If we see here, the only thing we have is a servlet class and the URL.
The question never says that there is a appropriate [assume] <servlet> entries in the DD. Hence i assumed that since the DD is not given , the given URL will never invoke the above servlet and simply respond saying that page cannot be found. To my surprise the answer the question was
An error page is returned from the Server. With explaination as
The Servlet does not implement a doGet method so, an error is returned.
and my answer "The server will not find the Servlet due to an incorrect URL." was rejected.
Who is correct? Can we expect such type of questions in exam