I don't have any experience with JSP and Servlets, and I have a question: In my project I need to include users registration (after submitting form data is validated, if it's correct, it's written into XML file. If there are errors, approperiate message is displayed, also if username is already taken). And my question is - what is the best way to implement this, I mean the architecture of the application (where should i save the data into XML file, how to return error message to the JSP page that contains a form if the username is already in use etc.).
I would be really, really glad if someone explained me how it should be done properly.