I am preparing for SCWCD exam. I am following Kathy Sierra's textbook - Head First Servlets and JSPs.
I am practicing the programs given in the text book for better understanding. There is a program in chapter-3, where the user will select one of the items (coffee/beer color) from the drop down menu which is a HTML file. Now, based on the user selection, the servlet should give some suggetions that which kind of beer/coffee brands the user may want to try.
Everything is working fine for me except, after the user selects the item and hits the button, there is a file getting created on my machine to which the suggested brands are getting written. I am not able to understand why is it happening. I want the output (brand suggestions) to be displayed on the browser window. Please let me know how can I fix it and what is going to wrong.
Below, I attached my HTML and Servlet codes.
My servlet's doGet() and doPost() looks like this: