I think your req, resp variables are local and your method needs to take it as an argument. Your doPost() or doGet() method has the reference to req, resp. If that is not the case please provide more details like compile time or run time error and error details.
We're pleased to have you here with us here on the ranch, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.
In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious. You can change it here