I can login with username and password, I can get all the information from database in the edit page. However, when I edit and click on "Submit" in EditPage.jsp, it gives HTTP Status 404. Same screen appears when I click on "Sign Up" from first page (NewFile.jsp) and click on "Submit" button after filling up user information.
I am posting all my code here but probably important ones are: EditPage.jsp, Edit.java, EditDetails.java, UpdateUser.java and for Sign Up SignUpPage.jsp and Registration.java.
Firstly here are my error message and ss from my project explorer:
There are 3 form actions. One of them is in NewFile.jsp: <form action = "LoginServlet" method = "post"> This one is for submitting username and password. One of them is in SignUpPage.jsp: <form action="Registration" method="post"> This one is submitting register page. And the last one is in EditPage.jsp: <form name="frm1" action= "Edit" method = "post"> to submit edited information.
It looks like 1st one is working and rest are not working and I couldn't figure out why. BTW I'm new in Java web.
It looks like 1st one is working and rest are not working
The first one is mapped (in LoginServlet.java), the other two are not. The URL you need to use is determined by the "@WebServlet" annotation. There is no such annotation in Registration.java , and the one in Edit.java points to a different URL (/UpdateCustomerServlet).
As a general practice I recommend that you remove the word "servlet" from any mappings, for example you might have "Register", "Login" and "Edit".