Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Articles on MVC model with Servlet/JSP

 
Bryan Welch
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know of some good articles that talk about using the MVC model with java and JSP? There's the usual relationships:
Model = Java Object (session, database, etc)
View = JSP/HTML
Controller = Java Servlet
I'm looking for some articles with details on using this model. For example, I like splitting the View between Java and JSP. The flow of logic is then:
1. Web page displays.
2. User makes selection (gives some kind of input)
3. Java Servlet Controller interprets input, makes decisions about flow, modifies model appropriately.
4. Servlet redirects to JSP page
5. JSP page uses beans to access model and a java View class
to create the view.
There are other control issues with this. Error handling can be tricky. Should all jsp be inside of some kind of try/catch to make sure the view can't break? How do you handle errors at the lower lever, where do you catch them, and how do you make them easier to trace and debug?
There's a lot for discussion. Any articles or books that get into this kind of thing?
 
Matthew X. Brown
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is an excellent chapter from Sun- check it out that, in detail, discusses the mvc pattern.
http://developer.java.sun.com/developer/Books/projsp/Chap24.pdf
Also, another pattern worth considering is the translator pattern- detailed in October 2000's issue of Java Report.
 
Matthew X. Brown
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Brian- one other place you can check: http://theserverside.com
Search under MVC pattern- there is a ton of threads on it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic