Precisely the same Railo mistake as last time

In the past I've had problems with my blog working on mobiles. Something to do with the way it's set up for Coldfusion but I'm running Railo.

I blogged about it here: My very few BlogCFC woes

So when I switched across to my new server recently, I forgot to make the changes to get it running on my new server. I have in fact done something slightly differently this time though, I've changed the /railo/tomcat/conf/web.xml file instead of the one in the instance of Skeater.co.uk, so the changes are global.

view plain print about
1<!-- Mappings for the Railo servlet -->
2 <servlet-mapping>
3 <servlet-name>GlobalCFMLServlet</servlet-name>
4 <url-pattern>*.cfm</url-pattern>
5 <url-pattern>*.cfml</url-pattern>
6 <url-pattern>*.cfc</url-pattern>
7 <!-- Basic SES Mappings -->
8 <url-pattern>/index.cfm/ *</url-pattern>
9 <url-pattern>/default.cfm/ *</url-pattern>
10 <url-pattern>/post.cfm/ *</url-pattern>
11 <url-pattern>/archive.cfm/ *</url-pattern>
12 <url-pattern>/blog.cfm/ *</url-pattern>
13 <url-pattern>/page.cfm/ *</url-pattern>
14 <!--- NEXT LINE FIXES THE MOBILE SITE SES URLS --->
15 <url-pattern>/mobile/index.cfm/ *</url-pattern>
16 <url-pattern>/rewrite.cfm/ *</url-pattern>
17 </servlet-mapping>

Note: once again, the white space between the slash, /, and the star, *, is just to stop the blog trying to use it as a comment.

So thanks Sparky for pointing out the error, and no thanks to you Pete, for being an idiot and not correcting the problem that you've had before so you should have known! Dumb ass.

My very few BlogCFC woes

So this isn't going to be interesting for a non-techie, and is really only going to be useful for people using BlogCFC.

So I'm really loving being all Coldfusion based for my blog, it's nice being able to browse the code and see what's going on, Mr Camden has done a great job building it, and his wise cracking code comments make it even more enjoyable to install.

However, I have had a couple of snags when installing it, so I thought I'd mention them incase others had similar problems.

Issues with BlogCFC Mobile SES on Railo

The BlogCFC documentation points to this thread on google groups, explaining how to get the SES URLs working in Railo (which is the Coldfusion server I use for the blog if you haven't guessed), and that's all great and good. Without the additional servlet-mappings you get 404 errors aplenty.

But I was getting 404 errors when linking to the SES URLs on a mobile device. So I had to add an additional line to the servlet-mapping and then reboot my Railo install. Maybe I didn't need to do that part, rebooting definately fixed it after adding the additional line, but I'd like to know if there's a way to do a "graceful" Railo restart, like you can do reload/graceful with Apache.

Anyway, this is the servlet mapping stored in the WEB-INF/web.xml file, with the additional line required in bold (also this is my first use of the </code> tag!).

view plain print about
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<web-app xmlns="http://java.sun.com/xml/ns/javaee"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
5http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"

6 version="2.5">

7 <servlet-mapping>
8 <servlet-name>CFMLServlet</servlet-name>
9 <url-pattern>/index.cfm/ *</url-pattern>
10 <url-pattern>/page.cfm/ *</url-pattern>
11 <url-pattern>/print.cfm/ *</url-pattern>
12 <url-pattern>/rss.cfm/ *</url-pattern>
13 <url-pattern>/slideshow.cfm/ *</url-pattern>
14 <!--- THE NEXT LINE IS THE ONE THAT FIXED THE MOBILE SITE --->
15 <url-pattern>/mobile/index.cfm/ *</url-pattern>
16 </servlet-mapping>
17</web-app>

So there you have it, I hope that helps someone else one day too.

NOTE: I put a white space in the "/ *", otherwise it was starting a comment and breaking the font for the rest of the page. DON'T put the white space in your web.xml file!

BlogCFC Admin styles in Google Chrome

So this isn't quite so bad, but was still a bit annoying. But bloody easy to fix/make bearable. The admin panel works fine in Firefox, no complaints at all, but in Chrome there were a few issues I had.

The #content div was really narrow and didn't fill up the page width, so all the tabs at the top of the page were stacked on top of each other and misaligned. This made it quite hard to use the tool, as I had to do a lot of scrolling up and down the page.

As well as that, I thought the font size was much to small, which meant I had even less stuff on the screen. Part of the problem might be because I've given up my 1080p monitor to the Mac, so I'm currently using a 1280 x 1024 17" monitor.

Anyway, to fix these 2 issues, I just added these 2 lines to the admin.css file

view plain print about
1font-size:0.8em;
2    width:700px;

When I switch back to my big screen I might want to set that 700px to something a bit higher, but it's pretty useable now.

So this might be a quick dirty fix, it might not be the best way around it, but it works fine and I'm happy. I'm not sure if it'll get over written when the blog gets updated though.

Has anyone else had either of these issues with BlogCFC?