For this particular use-case, I'd suggest reducing the scriptlet to a custom tag. This would give you the ability to customize it later if your needs change and avoid cut-and-paste reuse through the site. But that's not going to require the use of Struts in any way.
Model 2 and MVC are about designing dynamic Web applications that collect and return data customized to each user. Not every Web site needs to be dynamic or an application. Given this use case, I'd say you have some pages with dynamic elements but not a web application, so Model 2 and the rest of it doesn't apply. Of course, there are many large static sites that can benefit from a navigational controller to manage the links between its pages. But that is not what was presented here. -- Ted Husted, Husted dot Com, Fairport NY US -- Developing Java Web Applications with Struts -- Tel: +1 585 737-3463 -- Web: http://husted.com/about/services James Ward wrote: > > Ok, I must admit that I love Struts! Who doesn't? But I have a design > dilemma. Let's suppose that I have a simple, almost static web site. > Except that on the header of each page I read the url and I am coming > from and pull some info based on that url, from a database... Simple > right? Now wouldn't MVC suggest that any request to my site that needs > something from the model go through a controller? So if I put a > controller in front of all of my pages, I either get weird url's that > don't play nice with search engines (And aren't very pretty) like: > http://mysite.com/Main.do?page=index.jsp > http://mysite.com/Main.do?page=AboutUs.jsp > Or I have to create struts actions for each page: > http://mysite.com/Index.do > http://mysite.com/AboutUs.do > > Neither of these seems ideal... So I thought I would ask the experts. > > What do you all think? Is this a place where I can stray from MVC and > do something like: > <% > String url = request.getHeader("host"); > url = url.toLowerCase(); > url = url.substring(0,url.indexOf(".")); > MemberTO myMember = new MemberBean().getMember(url); > %> > > Or, is there a much better way to do this? > > Thanks for your help. > > -James > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>