Thank you for replying Trefor. Yes, you understand correctly. And I have considered your solution (using one servlet or JSP) but have a couple of problems with it ~
1. It produces some really horrible URLS. For example ~ http://www.yyy.com/index.jsp?level1=Products&level2=Goo&level3=... This isn't just my girly esthetics but it's actually a problem when our sales reps want to tell somebody the URL of a particular product over the phone. So easy to ay "www dot yyy dot com slash products slash bathroom" compared to saying the querystring equivalent. 2. For a site with say 300 pages, that 'switch' statement (or whatever is used to fetch the body content) gets very long, complex and prone to error. For this reason, if I were to use the method that you suggest, I would stick all the content in a database and then use a Javabean to extract it, but that brings up the problem that I don't have a content management system to manage the content in the database :( It's strange to think that we don't have a silver bullet for this yet. Soefara. >From: "Gare, Trefor" <[EMAIL PROTECTED]> >Reply-To: A mailing list about Java Server Pages specification and >reference <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: Re: Better way to build a site than or with JSPs ? >Date: Wed, 27 Feb 2002 18:35:51 +1100 > >I may not have quite understood your structure but it seems strange to be >creating all those separate directories when it's only the body include >that >is changing for each link. It looks like you should be using a servlet to >detect which link has been requested (via the querystring perhaps) and then >creating each page dynamiclly. The same could be done in a JSP if you >prefer with a switch statement or a set of if/else statements leading to >the >different includes > > >ie: > index.jsp > --------- > <%@ include file="/Global/Banner.jsp" %> > <table> > <tr> > <td><%@ include file="/Global/Menu.jsp" %></td> > <td> > <% > if (request.getParameter("linkName") == "blah"){ > //include the blah body text > }else if (request.getParameter("linkName") == "blob"){ > //include the blob body texyt > }else{ > //include the default body text > } > %> > </td> > </tr> > </table> > <%@ include file="/Global/Footer.jsp" %> > >That would mean that essentially all you'd be editing would ever be the >body includes. _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
