Pranit Sonawane wrote:I've been advised to not to use JSP - Servlet combination. So I've stopped using it.
Well, in my opinion that was bad advice.
But on the other hand your code is just full of bad practices, so it isn't surprising that you believed that was good advice and accepted it. (I don't mean to be critical, because the bad practices I see in your code are the same ones that I see in every other beginner's code here too -- I've given up on pointing these things out and I just hope that people outgrow them before they start writing real software.)
So anyway, the standard version of "best architecture" for today is to have your links point to servlets (as yours do). The servlet should check the input data, do any validations necessary and update the application's state as necessary. Finally it should put the data needed for the output into the request context (or into the session if it needs to persist beyond the current request) and forward to a JSP, which will take the data from the request context and render it into HTML.
Hmm. Thanks a lot Paul & Bear, your advises have always been so helpful. I read the article as suggested by Bear and will be following the standard code practices as suggested by Paul. Thanks again to both of you for your guidance.
subject: Http Status Error 405 : get Method Not Supported.