
PrintWriter cannot be resolved to a type
why is it occured

You have imported the package java.io.*. If not then import it and restart the command prompt to recompile the servlet. After that restart the tomcat server and run your servlet.

Hi Please specify the servlet code...........
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.