package com.elseforif.servlet; import com.elseforif.URLs; import com.elseforif.servlet.utility.ElseForIfHTMLWriter; import com.elseforif.servlet.utility.constraint.ServletParameters; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; /** * Here's the home page for Else For If. You may notice it is layed out * somewhat differently from the other pages, with the menu on the left * and a column of icon links on the right, which latter do not appear * on the other pages. This is actually handled in ElseForIfHTMLWriter, * based on the "menu mode" of each servlet. Thus, any servlet which defines * 'm_menuMode' as 'MENU_MODE_HOME' will share the same layout as this page. */ public class Main extends ElseForIfServlet { /** * Initialize this servlet for use. * * @param servletConfig an object containing this servlet's configuration */ public void init(ServletConfig servletConfig) throws ServletException { super.init(servletConfig); m_title = "Else For If Home Page"; m_menuMode = MENU_MODE_HOME; } /** * Output the Else For If home page, including late breaking news. * * @param request a servlet request * @param response the response for that request * @param session the user's session object * @param out a custom HTML output writer */ protected void doBoth(HttpServletRequest request, HttpServletResponse response, HttpSession session, ServletParameters in, ElseForIfHTMLWriter out) throws Exception { out.printPreContent(this); out.startBubble("Welcome!"); <% This is the home of Else For If, an independent Web software development shop. We specialize in building custom, interactive sites of flexible form and sound architecture.

This is our <%= out.A(URLs.PHILOSOPHY, "philosophy") %>. You should find it is reflected in the <%= out.A(URLs.PRODUCTS, "fruits") %> of our labor. If we might offer you any service, feel free to <%= out.A(URLs.CONTACT + "?category=contracts", "contact us") %>. %> out.finishBubble(); out.startBubble("News:"); <% 2007.3.18:  Version 1.4 of my servlet library, elseforif-servlet, is up on <%= out.A("http://sourceforge.net/project/showfiles.php?group_id=107664&package_id=135378", "SourceForge") %> now. --Jason

2007.3.14:  A friend of mine asked me to code a little interface for an NCAA tournament pool, called March Madness. <%= out.A("http://www.chipsandwaycool.com", "The site") %> lets users enter their favorite teams, and as the winners are entered in, users' scores are tallied for them, which in previous years they would have to do on paper. The UI worked out well, a reasonably good-looking layout using some newer CSS features. I'm using the site in an article for IBM's Java developerWorks site, to show off my pure-servlets design, also highlighted on ElseForIf.com. --Jason

2005.3.09:  I've been working on a new <%= out.A("http://www.vancleve.com/help/Terminal?target=chapter7", "email reminder interface") %>, essentially, on <%= out.A("http://www.vancleve.com/", "VanCleve.com") %>. There are commands for adding singular or recurring events, each of which can be assigned various intervals at which emails can be sent in advance of the event. If you want an account (required for this feature), request one <%= out.A("mailto:webmaster@vancleve.com", "here") %>. --Jason

2004.11.08:  Here marks the launch of this site, a little moonlighting venture I call Else For If. --Jason

2004.10.26:  I've begun converting <%= out.A("http://www.vancleve.com/", "VanCleve.com") %> to XHTML, just to sink my teeth into the matter. Most of it is <%= out.A("http://validator.w3.org/", "validating") %> successfully. I'm tempted to slap that little W3C validator link icon on every page, just to flaunt my own conformity. --Jason

2004.10.23:  I added the Gimp to the icon list, but in truth I've used <%= out.A("http://www.jasc.com/products/", "Paint Shop Pro") %> for most of the image work. Anyone have a little PSP icon to add to my list? %> out.finishBubble(); out.printPostContent(this); } }