MVC Architecture

In the Professional JSP book, chapter 6, where they discuss the MVC architecture, I don't see where they discuss how to actually build and use the components (other than a web page that shows all works) I'm getting tons of errors trying to build even the controller.java piece. Since there are multiple packages, some of my import statements, for example, don't seem to work correctly. Anybody successfully implemented this chapter's stuff? Is there a simpler introduction to some working MVC code I should/could look at first? Thanks for anybody's input. --Mike

Have you looked at struts at jakarta.apache.org ? That may give you some ideas I've implemented a full MVC app myself from scratch, but can't share the code (client's own it) ... Will be glad to answer any specific questions about MVC though

Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1114

posted Aug 01, 2002 11:55:00

0

Thanks for your reply. <s> My basic problem is that I don't know where to put some of the files. Here's my take for Tomcat. I have some "holes" in my knowledge though as I'll indicate below. 1. JSP files -- anywhere under ROOT. This part OK. 2. Compiled classes -- under WEB-INF\classes. 3.Where do config files go? Among these ... WEB.XML Event.properties URL.properties I think I *almost* have the downloaded Wrox code set up right (and can then spend however much time is needed to actually understand it). Chapter 6 in the Wrox Professional JSP is good, but forgets to explain how to actually set up, on Tomcat, all the good code that's there -- I'm talking mostly about these config files that aren't covered, that I can see, in the Tomcat setup discussed earlier in the book. Look forward to your reply. -- Mike

A great book for web app configuration is "More Servlets and JavaServer Pages" by Marty Hall.

Ronald Francis
Ranch Hand

Joined: Aug 02, 2001
Posts: 30

posted Aug 01, 2002 13:39:00

0

Well web.xml is easy , it goes under Web-inf Unfortunately , the property files are trickier, depends on how the code is trying to access them. Maybe a quick grep /find in files on the code will reveal whats happening.

Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1114

posted Aug 01, 2002 14:02:00

0

Thanks for all the great replies. Yes, the More Servlets book is much more understandable for MVC. However, regarding the placement of these config files from the PRofessional JSP, 2nd Edition,(like "Event.properties" and such), why isn't this documented in the book as to where they should go. This chapter seems half finished. The code is good, the discussion is good, but the configuration of all the cool code (seems to be) left out. Thanks again... -- Mike

I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com