Juseppe, a simple JSP framework

Juseppe is a simple framework for JSP development. I wrote it to speed up my (and my colleagues’) work, but you can use it too. Juseppe is implemented as a Java Servlet Filter and meant to be used in a JSP 2.0 + JSTL environment.

Goals

Clean URIs

With Juseppe, your URIs will not reveal the underlying technology. This is both a security advantage and a wise naming design: when you’ll reimplement your site with a new technology chances are you’ll be able to preserve the old URIs and break no links. Your URIs will look like:

http://www.dumbnews.com/politics
http://www.dumbnews.com/article/4321

and not:

http://www.dumbnews.com/politics.jsp
http://www.dumbnews.com/article.jsp?id=4321

Site structure

Juseppe simplifies JSP development and mantainance by providing a navigation system among web application resources. Instead of hardcoding links and site sections inside JSPs, Juseppe puts the website structure in a freeform XML file. URIs are then mapped to XML nodes and to JSPs using XPath expressions. This makes adding and removing sections much easier than delving inside spaghetti JSP code.

This is a typical XML configuration:

<page name="." resource="/home.jsp" display="Homepage">
<page name="politics" resource="/politics.jsp" display="Politics"/>
<page name="technology" resource="/technology.jsp" display="Technology"/>
<page name="article" resource="/article.jsp"/>
</page>

Take a look to the demo!

The quickest way to grasp the concept behind this project is trying the sample webapp included in the distribution.

Starting a new web application from scratch

  1. Drop juseppe-x.x.x.war found in the binary distribution in your servlet container web application directory.

Using Juseppe in an existing web application

  1. Extract juseppe-x.x.x.war using the jar utility (or any other zip utility).
  2. Copy the libraries found in WEB-INF/lib to your application WEB-INF/lib directory.
  3. Copy WEB-INF/juseppe.xml to your application WEB-INF directory.
  4. Open WEB-INF/web.xml, then cut’n’paste the Juseppe Filter definition and mapping to your web.xml.
  5. Customize WEB-INF/juseppe.xml according to your website structure.
  6. Possibly customize Juseppe Filter init-params in WEB-INF/web.xml.

For reference documentation see the Javadocs included in the distribution.

Status

Juseppe is production ready. It is currently used on the following (italian) sites:

Legal

Juseppe is Open Source software distributed under the Apache License Version 2.0.

Requirements

Download

  1. Remy says:

    Issue with tomcat AJP connector
    ‘requestURL’ doesn’t work for AJP connector, use ‘requestURI’

    prelude.jspf,v 1.1 2005/05/25:

    change

    to

    and your fine