404 means the servlet container can not find the servlet.
The most likely reasons - either:
1. the servlet container does not recognize your directory as containing a web application
2. the servlet container can not find a servlet corresponding to your web.xml and url addressing.
If this was my problem I would first see if the server could find a plain HTML page in your web application directory.
Note that your
Java code has nothing to do with your 404 error, something is wrong elsewhere.
Bill