Category Archives: Java

Passing Page Values with Tiles and JSTL

Posted on

For added flexibility, where I work we’ve wanted to convert our non-application JSP page to PHP for some time now. In redesigning elements to be reusable, one of the things they incorporate is the ability to pass a value from a page to an included component, making the component generic and reusable and giving the […]


JSP Date Snippet

Posted on

Being a traditionalist, I tend to forget some of the things you can do with tag libraries like JSTL above and beyond simple things like outputting information. A colleague asked me about putting the current year on a page and my first response was something like this: <%@ page import="java.util.*"%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%> <%@ […]


Javascript Sorting

Posted on

Not too long ago, I was asked, as a theoretical question, how I might take a string of random alphabetical characters and sort them in order using Javascript. Thus, given NFARAKDMSLSJDQKJKCXLK, find a simple way to turn it into AACDDFJJKKKKLLMNQRSSX. It’s a pretty basic question for anyone who uses Javascript and I immediately thought of […]


Creating an RSS Feed in JHTML

Posted on

Because we use an older version of ATG Dynamo (6.2.0) at my place of employment, we’re sometimes constrained in what we can do and aren’t able to take advantage of features in newer versions of Dynamo. One of those features is the ability to generate an RSS feed from a content repository (which I believe […]


A Breadcrumb Story

Posted on

Where I work, one of the site features is a breadcrumb trail on all pages allowing linking through the content hierarchy. All of the breadcrumbs in the breadcrumb trail was generated using a rather lengthy Javascript file. The main reason for the length was due how the folders were named and the number of exceptions […]


Amazon, jQuery and Fluent Interfaces

Posted on

Since adding my library, one of things that I wanted to do was leverage the Amazon API a little better and perhaps implement the ability to add books in a fashion a little more akin to that used by LinkedIn for their book library widget. When researching ways to do this, I came across the […]


JHTML Parameter Munging with Java

Posted on

On our site, we have a search engine that does a file system crawl and returns a list of items, generating the URL to that item as it goes. We recently started using Teamsite forms for editors to create content and save it as XML. That XML is then rendered using a custom JHTML page […]


Spring Binding with Lists and A Form Gotcha

Posted on

Suppose we have an application that uses two kinds of beans: a Subscriber bean and a Dependent bean. We have a form that is used to edit the Subscriber and each Subscriber may have zero or more Dependents who are also editable. All the fields for Subscriber have been bound with Spring <form:form> tags. However, […]


Downloads and Response Headers

Posted on

One of the developers ran into a problem with a servlet he was working on recently. In his app, he was displaying a link that would cause the app to deliver a text file that the user would be prompted to save. All was well and good with Firefox with the following code: private final […]


Erlang or What I Learned at No Fluff Just Stuff

Posted on

I just wanted to hit some of the high points from the No Fluff Just Stuff Java conference I attended over the weekend in April of 2008. A presentation I attended was on improving code quality and the presenter specifically commented that sending people to conferences is a good option. But he also made the […]