IBM have a very good REDBOOK on building JSP/Servlet/EJB applications. It's biased towards Websphere, of course, but the patterns hold true for any Java App server. The patterns describe an MVC,(model view controller) model, very close to Fusebox. The URL for the RedBook is: http://publib-b.boulder.ibm.com/Redbooks.nsf/RedbookKeyLookup/SG24-5754-00?O penDocument The command pattern is very interesting, and something that can ONLY be done in Java! I too have found JSP's to be a bit messier than ColdFusion. Don't forget that ColdFusion can be used as the presentation layer and has a Java interface, to connect to a Java enterprise environment. Of course this will be a lot more seamless when NEO hits the shelves. << David Maddison >> wildfusion W: http://www.wildfusion.com E: [EMAIL PROTECTED] M: +44 (7747) 024455 YahooIM: maddisondavid >> -----Original Message----- >> From: Kola Oyedeji [mailto:[EMAIL PROTECTED]] >> Sent: 03 April 2001 11:10 >> To: Fusebox >> Subject: (OT:)RE: JSP fusebox (was RE: Decrypting tags) >> >> >> Apologies for the OT post. >> >> Jay >> >> Can i ask how your experience of using JSP has been. Its >> something i'm >> considering as i have a working >> knowledge of java. However from what i have seen so far, >> for the kind of web >> based applications i build >> coldfusion enables me to get the job done quicker and easier. I Just >> wondered if you found any significant advantages >> to using it (apart from it bieng cross platform and able to >> use existing >> Java classes). >> >> Also any disadvantages to using it as an alternative to >> coldfusion i would >> be interested in. >> >> I have heard that using EJBs makes it easier to seperate >> business logic from >> presentation? >> >> Thanks in advance >> >> Kola >> -----Original Message----- >> From: Jay Jennings [mailto:[EMAIL PROTECTED]] >> Sent: 02 April 2001 19:45 >> To: Fusebox >> Subject: RE: JSP fusebox (was RE: Decrypting tags) >> >> >> > so what did your index.jsp look like? >> >> Here's a little chunk: >> >> <!-- dpi.cfm for DentalPlanInfo.com --> >> <%@ page language= "java"%> >> <%@ page import="java.util.*"%> >> <%! String fa; %> >> <%! String pagename; %> >> >> <% >> fa = request.getParameter("fa"); >> if (fa == null) >> fa = "plan"; >> >> if (fa.equals("plan")) >> { >> %> >> <jsp:include page="dsp_plan.jsp" flush="true"/> >> <% >> } >> else if (fa.equals("mailmemberinfo")) >> { >> %> >> <jsp:include page="act_sendmembermail.jsp" >> flush="true"/> >> <jsp:include page="dsp_memberthanks.jsp" flush="true"/> >> <% >> } >> else >> { >> %> >> Define this fuseaction: [<%= fa %>]<br> >> <% >> } >> %> >> <jsp:include page="dpilogonav.jsp" flush="true"/> >> >> >> Notice that I used if/else instead of switch/case. That's >> because in java >> (as in C and other languages) switch/case only takes >> integers as values. So >> I could have made all my fuseactions numeric and just >> remembered that 4 was >> "mailmemberinfo" but I don't like to have to remember that >> much stuff. :) >> >> Another way to handle that would be to create a 2-element >> array holding the >> fuseaction words and matching numbers at the top of the >> file, and then >> lookup the number you need to use in the switch/case block. >> An if/else block >> creates more of a hit than switch/case, but adding a lookup >> would increase >> the code necessary to get the job done, too, so I just >> decided to go the >> route shown above. >> >> Also, this was the first jsp app that I wrote, so anything >> you see could >> probably be written better. =:) >> >> ..jj.. >> >> - - - - - >> Get your free email account: [EMAIL PROTECTED] >> Sign up at http://www.alakazam.com >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
