Referer log and RSS hit counter in Roller 0.9.6?

Roller suggestions Dave, if you're listening, here are my only two gripes with Roller right now. I would really really want a referrer log, and I would also like to know how many are subscribed to the RSS feed. I have a tracker which shows how many hit the webpage, but I have a feeling most people use RSS feeds (I do anyway). Add that, and I'm going to have to post a You Rule blog entry. Deal? ;-) [Valued Roller customer Rickard Oberg]
This is pretty tempting: Rickard Oberg publicly saying that "Dave rules." I could use that on my resume. All I have to do is to steal some code from MiniBlog and add an RSS hit counter? I'm in!

Victory over OC4J!

I couldn't resist solving the weird CSS problem and now Roller runs perfectly on OC4J!

The problem was this: IE was able to load the Roller style sheets, but Mozilla was not. The solution was this: add the line "text/css css" to OC4J's config/mime.types file and then delete the contents of the OC4J temporary files directory OC4J/default/roller.

Rejoice: no more install-blogging!

Conquered OC4J authentication.

OC4J does not like the funky server-side redirect that Roller uses to return the logging-in user to the page where they clicked the login link. This problem was causing a recursive redirect to redirect to redirect to infinity. Mozilla recognized the problem and put up that "Redirection Limit" popup, which is nice. IE did not recognize the problem and caused OC4J to crash, which is, to say the least, not nice.

This was an easy fix for me. I just switched my login-redirect.jsp page to use a client-side redirect rather than a server-side redirect and everything is peachy.

The next problem is XML related. Roller can't seem to read its XML menu definition file. The code, which works fine on Resin and Tomcat, uses ServletContext's getResourceAsStream() to get the XML file. On OC4J, the XML parser (called by the Jakarta Digester) blows up with a "XML-0220: (Fatal Error) Invalid InputSource" error. Rats! Time for some more googling.

UPDATE: this turned out to be a missing slash in the path to the menu config file under WEB-INF. I added the slash and that fixed Roller on OC4J and did not break Roller on Tomcat. Now Roller works perfectly on IE, but can't find it's stylesheets on Mozilla. I'll save this last problem for tomorrow.

More install-blogging

Tonight, I've been trying to complete the install of Roller of Oracle's OC4J9.0.3 J2EE app server. I've had a little luck, but I am still not quite there.

I tried the JDK 1.4 trick suggested by Matt from the JavaLobby and that worked for me. OC4J is now working fine for me under JDK 1.4.

Next, I searched around for docs on configuring OC4J Servlet Authentication so that I can get OC4J to use Roller's rolleruser and role tables. I found the docs for the Orion DataSourceUserManager on

Following those docs, I put a user-manager element after the principals element in the OC4J/application.xml file like so:

<user-manager class="com.evermind.sql.DataSourceUserManager">
  <property name="table" value="rolleruser" />
  <property name="passwordField" value="password" />
  <property name="usernameField" value="username" />
  <property name="groupMembershipTableName" value="role" />
  <property name="groupMembershipUsernameFieldName" value="username" />
  <property name="groupMembershipGroupFieldName" value="role" /> 
  <property name="dataSource" value="jdbc/rollerdb"/>

and I put a security-role mapping after the commit-coordinator elementin OC4J/application.xml:

<security-role-mapping name="guest">
  <group name="guest" /> 

Then I tried to login and OC4J complained that it could not find Roller's login page "404 Not Found Could not find form-login-error page: '/login.jsp?error=true'" Matt Raible's cool error=true trick is not acceptible to OC4J. So I wrote a loginerror.jsp page, took out the error=true thing and tried again.

Now, OC4J displays my login.jsp page, but when I post the page I get a "Redirection Limit for this URL exceeded, unable to load the requested page." Time to do some googling.

You just need to find a style.

I think you just need to find a style that adds the most value to yourself and the people you talk to and stick to it. I need to think about this more, but "trust" is a very key word. Blogs enable the creation and management of trust outside of centralized brands and authority... [Joi Ito on disclosure and trust in weblogs]

Main | Next day (Oct 18, 2002) »