Archive for May 2005

Thursday 19 May 05

Have now got the spellerpages application working correctly with the FCK Editor and ColdFusion. The solution had been emailed to me following a help message I put up on the spellerpages sourceforge forum. You can download the fix/patch from the sourceforge site.

Still been spending most of my time working on the Learning Design project (hence why I’ve not been posting much stuff here!)

Friday 13 May 05

Have just released a new version of the SLeD player (installation instructions & download). The main (only?!) change is that you now don’t need to set up all the config files and paths and on a default installation of CopperCore v.2.2.2 it should just be a case of dropping the SLeD.war into the Jboss deployment directory.

I’m still working on getting the player to work correctly with Level B learning designs – so if you try viewing these through SLeD they may or may not work. I’m working on getting this fixed now though. Thought it was probably best to get the updates that I had done out to people asap.

Please let me know if you find there’s anything else wrong with the latest version 😉

Friday 6 May 05

Making good progress in making the installation much easy, though it’s a bit slow going! I’ve moved all the config/xsl etc files to within the .war file. Then I could access these files by using the following:

  • Declare a ServletContext

    private ServletContext context;

  • Alter the init() method of the servlet so it’s like this:


    public void init(ServletConfig config) throws ServletException {
    context = config.getServletContext();
    // other stuff
    }

  • Then you can refer to the files in the .wzr as follows:


    InputStream myStream = context.getResourceAsStream(“xsl/myfile.xsl”);

The only part I had trouble with was when one of the xsl files used another xsl file as an include. If I hardcoded the full url to the xsl then is worked fine, but as soons as I tried to just use a relative url it all failed, just got a transformation exception (“Had IO Exception with the stylesheet file?”).

The solution to this was to create a URLResolver class (or a bit of looking around on the internet to find one someone else has already done or being emaied one!), then before running the transformation set the URIResolver:

tFactory.setURIResolver(new RenderResolver(renderContext.getRealPath(“/config/xsl/”) + “\\”));

The examples I originally found on the internet didn’t seem to have the +”\\” added in (for the file/directory seperator), so it didn’t work, but as soon as this was suggested to me and I added it in, everything was working fine

Much of this progress is thanks to the help & suggestions from Paul Sharples (Reload developer) 😉 I hope to have the next version of the player available sometime next week….