This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hey guys i have a problem and I have tried several times to solve it. Here is the scenario. I created a student registration HTML file and a servlet to answer this file. The problem is the submit button doesn't work on the html form. I have tried dozens and dozens of ways to put the right "action =path" but it doesn't work. This is what I did step-by-step.
In NETBEANS 6.9.1
1) Create new web application project.
2) Under source packages, I created a new Chapter39 package.
3) After that, I right-clicked the chapter39 package and created a HTML form and a java servlet.
4) After creating both, I right clicked the HTML form and clicked "VIEW"
5) I entered the information into the html form and when I clicked submit, it said "FILE NOT FOUND". When I went to the location of the file, it was there. So I don't understand.... what's going on.
HERE IS THE HTML CODE.
AND HERE IS THE SERVLET CODE
HERE IS THE web.xml
Please just tell me what I must put for the "ACTION = " in the html form.
I have tried .....
action = "getStudentInfo"
action = "/getStudentInfo"
action = "/servlet/getStudentInfo"
Please read this: ItDoesntWorkIsUseless. Also, we don't know whether that HTML code was served from your web application or from somewhere else. Its base URL is important information which you didn't provide.