Jayson Falkner wrote: > Does anyone seriously use the JSTL XML, URL, and SQL tags? I'm looking > for some reasons as to why they are helpful, but, I can't really find > any. Obviously they work, but the important point seems to be the tag's > functionality would best be placed elsewhere using Model 2 (MVC). > > If anyone is seriously using them and has a good argument as to why they > are helpful, I'd like to discuss it with them further. Does anyone?
As Shawn and David, I think these types of actions make sense. It's dangerous to think that "one size fits all." In general, I recommend using a MVC design with a servlet as the Controller and all database access performed by Java classes rather than action elements. But there are exceptions where I think it's perfectly okay to use the database access actions in JSP pages, e.g. * for a small, company-internal application, when no one with enough Java knowledge is around to develop servlets. I believe this is a very common scenario that is often overlooked when programmers discuss "the right way" to develop web applications. The alternatives in a case like this are likely that the app doesn't get developed at all, or that it's done with JDBC code is scriptlets, or (gasp!) using ASP and Visual Basic code. * for any simple application, when its clear that it will not go through major extensions; using just JSP pages with action elements is probaly very cost-efficive in this case (lower development time). * for prototyping an idea; if the proof-of-concept is successful, the app can be redesigned with a servlet Controller, filters, and all the other goodies after getting some experience with the basic application functionality. Even when only JSP pages are used, it's still a good idea to follow the MVC patter, though; use separate JSP pages for View pages and Controller/Model pages. This makes it easier to introduce servlets when warranted. As Shawn, I also see the URL actions as a perfect fit with the View in MVC, no matter if you use servlets or not. XML processing can be either or, but there are cases where it makes perfect sense to use them in pure View components. The only really controversial actions are the database actions, but like I said, there are cases where it's a good idea to use them. Hans -- Hans Bergsten [EMAIL PROTECTED] Gefion Software http://www.gefionsoftware.com JavaServer Pages http://TheJSPBook.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>