cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Sample site for the latest build

brentkastner
Champ in-the-making
Champ in-the-making
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 Util.java file located at or.alfresco.web.pr 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.io.*;
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.

Thanks,

Brent Kastner
Eye Street Software
brent.kastner@eyestreet.com
5 REPLIES 5

arielb
Champ in-the-making
Champ in-the-making
if you are compiling from source, you should be able to recompile a functional sample website compatible with the latest build by doing:
ant -buildfile projects/web-client/project-build.xml sample-website

the war file will end up in projects/web-client/build/dist/

dgibbons
Champ in-the-making
Champ in-the-making
I notice that the "Import website content" feature described in the tutorial no longer exists in the current builds.

Has this been dropped or is there another way to use this functionality?

dgibbons
Champ in-the-making
Champ in-the-making
Never mind, figured it out!  Guess I should wait until the official release (and the updated docs), but this is cool stuff…

kvc
Champ in-the-making
Champ in-the-making
Never mind, figured it out!  Guess I should wait until the official release (and the updated docs), but this is cool stuff…

Yes, it is AND isn't in the current build.

For everyone wondering, the Import Website Content has been deprecated and replaced for BETA and GA with a Bulk Import action.  This action is available from the Actions menu within a user's sandbox.  This allows users to upload any directory over time into their sandbox, see the list of unpacked files in the Modified Items list, preview, and then submit (which will create a workflow task for whatever workflow you have configured for non-form related assets).

The Bulk Import action supports unpacking of zip, tar, and WAR files.  The WAR files specifically are to support our new capability of supporting multiple web apps.  In the Preview, we supported the ROOT web app only … now, you have access to a Create Web App command within your sandbox, so that you can have a website that is composed of multiple web apps.  You can switch context easily between web apps, import an existing web app to preview, and, of course preview via the Virtualization Server.

This is also expected to be used in combo with the File System Interface (new in the current build), which will allow your Web Developers and Application Developers to use DreamWeaver or Eclipse or any other tool to create and modify web assets.

Now, onto QA to get BETA out next week!

Kevin

anilkumar_sama
Champ in-the-making
Champ in-the-making
Hi,

Can you help me out with steps for downloading source code?

Is it necessary to install eclipse and SVN for the same?

Please reply me soon.

Thanks in advance
Anil