You are here:
Adobe MAX - The premier Adobe event! Adobe MAX - The premier Adobe event!

Open BlueDragon (OpenBD) 1.4 bundled with Tomcat 6 - Support SES URLs - Update web.xml

I have a local development machine running OpenBD 1.4 (Open BlueDragon - a CFML java engine, similar to Adobe ColdFusion ) which sits on top of an Apache Tomcat 6.0 web server. As I'm developing applications locally, I use the Apache Tomcat server as my http server. I have some newer applications that utilise SES URL's (When I say SES I mean http://www.mydomain.com/index.cfm/xxx/xxx/). I fired up one of the applications and I was served up Tomcat Error 404, page not found.

Update web.xml with SES URLs Filter to support /index.cfm/*

After some playing around and scouring the internet for answers I stumbled across the answer over at my colleague Stewart Roberts, blog. The simple fix solved all of my problems. Here is the step by step.

  1. Open your installation path to OpenBD or Tomcat and locate a file called web.xml. (In my installation this is located at "C:\openbd\tomcat\conf\web.xml")
  2. Open the file in a text editor (notepad, wordpad or textpad) and locate the line:<servlet-mapping><servlet-name>cfmServlet</servlet-name><url-pattern>*.cfm</url-pattern></servlet-mapping>.
  3. Under the line of code you have just located, you are going to insert a new line of code to support your new URL structure of "*/index.cfm/*". The code is as follows:

<servlet-mapping>
<servlet-name>cfmServlet</servlet-name>
<url-pattern>/index.cfm/*</url-pattern>
</servlet-mapping>

Restart your Tomcat or OpenBD installation and you should be good to go. No more 404 pages and happy coding :-)