I'm newbie in servlet API. I have a test task to create a very simple web app with one home page and an authorization form. The requirement is to use filter in my app.
Given that it's a super simple app, I implemented basic login and registration functions right in my filter (it was much simpler for me).
Here is the question: can I do this at all according to the best practices? Or should I only leave the cookie check in the filter and move all other functions to separate servlets? Is it necessary?
The link to the filter (gist): https://gist.github.com/LexSav7/7b19acd51756c201df3b91f777adb8f6
P.S. I know that logic there is awful, I'm only learning :)
Aucun commentaire:
Enregistrer un commentaire