AnsweredAssumed Answered

Alfresco Sample site for the latest build

Question asked by brentkastner on Dec 21, 2006
Latest reply on Jul 15, 2009 by anilkumar.sama
Good morning,

Those of you on the latest build(s) of Alfresco wcm, have probably already discovered that the Alfresco sample website does not run correctly for press-releases, and company footer.  The reason for this is that some of the AVM and JNDI libraries have moved around between releases.  It is a fairly straight-forward process to resolve this issue though.

In the file located at you will find several import statements.  Replace the import statements with the following:

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.PageContext;
import java.util.*;
import org.alfresco.jndi.*;
import org.alfresco.service.cmr.remote.AVMRemote;
import org.alfresco.service.cmr.avm.AVMNodeDescriptor;
import org.w3c.dom.*;
import javax.xml.parsers.*;
import java.text.*;

Next, find the line that contains this:

final InputStream istream

and replace it with this:

final InputStream istream = avm_remote.getFileInputStream( -1, avmPath + '/' + entryName );

You can then compile this into a class, and package it into a jar with the same name as theirs, alfresco-sample-website.jar.  Update said jar in Alfresco and restart virtualization.

Note:  if you are using eclipse, you will need to reference external jars in the buildpath to resolve some types.  The jars are all in virtual_tomcat/common/lib, add core.jar, jsp-api.jar, repository.jar, and servlet-api.jar.

If anyone is still having trouble, I'd be happy to email you the compiled jar and/or source code.


Brent Kastner
Eye Street Software