Howto: Smart URLs

Tags: Uncategorized

I had a problem, I’m not afraid to admit it. The URL’s on my site sucked. Example:

Obviously, this is a consequence of creating a dynamic site. There is one post template page, and it loads data from MySql based on an id. Unfortunately, to search engines and logfile analyzers, your site seems like it only has one page (

But, thanks to a couple servlets, that’s all behind me. Now, instead of URLs looking like this: looking like this:

For this example, I created a SectionServlet, mapped it to /section/*. The servlet parses its request.getPathInfo(), which in this case would be /home/tech/, and forwards the request to the section Action ( passing the appropriate parameters.

About Me

Hey there. My name is Carter Rabasa and I am a husband and father of two beautiful daughters Catherine and Emily. I live in Seattle, WA.