Can you provide a link for best or elegant MVC tutorial/example for JSP/Servlet? I am going to refactor a JSP based application. so I need a good reference or template to start with. I maybe not going to use any framework.
This is a step by step tutorial for the Spring Framework. Hope that helps you.
I find Stripes very elegant so I'd suggest its Quick Start Guide. For Spring, there is the Developing a Spring Framework MVC application step-by-step. For Struts 2, have a look at the Tutorials from the documentation.
EDIT: I would really recommend to use a framework instead of doing everything from scratch but, if you really do so, please get Head First Servlets and JSP: Passing the Sun Certified Web Component Developer Exam and see chapter 3. Mini MVC tutorial: hands-on MVC app.
EDIT2: I don't mean to be rude but the fact that you are asking for a MVC tutorial is actually the proof you shouldn't roll out your own framework. Seriously, reconsider going this way and use an existing solution.
you can check Controller (MVC) Tips for Java Servlets / JSP I guess that's what you are looking for.
Hello,
Check this one:
http://www.amazon.com/Murachs-Java-Servlets-JSP-2nd/dp/1890774448/ref=dp%5Fcp%5Fob%5Fb%5Ftitle%5F2
Here is a brief description gotten from amazon:
it teaches how and when to use JavaServer Pages and Java servlets to build well-structured web applications that implement the MVC pattern.
Seems to be exactly what you need.
This one is also a nice basic intro to MVC: http://www.javaranch.com/journal/200603/frontman.html
Try this, Simple MVC Example. The courtesy of Ben Souther, JavaRanch Sheriff.