You have wrong types of parameters in the method toGet()
. They should be HttpServletRequest and HttpServletResponse:
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response)
Such bugs are very unpleasant, because they aren't easy to detect.
So don't disregard annotation @Override
.
Use it to avoid different misprint and other unfortunate misunderstandings in method name or its signature. It'll help you to find these mistakes at compile time.