cancel
Showing results for 
Search instead for 
Did you mean: 

Help with Alfresco

km70569w
Champ in-the-making
Champ in-the-making
Hi I am very new to Alresco and have just started reading the book Alfresco Developer Guide By Jeff Potts. I was going through the first test of the book on chapter 2 to just to see the login page changes for Someco. I made the created the project on eclipse and followed the step in the book. But I cannot get it to going. I do not get the desired result. Here is what I did.

I created a client-extensions project where I have the following directory structure:
client-extensions
      - src
           > java
           > web
               >> someco
                        >>> images
                               >>>> someco-logo.png
      - config
           > alfresco
                 >> extension
                         >>> model
                                >>>> scModel.xml
                         >>> someco-model-context.xml
                         >>> web-client-config-custom.xml
      - web
           > jsp
               >> extension
                     >>> login.jsp
                     >>> relogin.jsp
      - build.xml
      - build.prperties


Here is the build.xml file that i have:
<?xml version="1.0"?>

<project name="client-extension" default="package-extension" basedir=".">

   <property name="project.dir" value="." />
   <property name="build.dir" value="${project.dir}/build" />
   <property name="web.dir" value="${project.dir}/web" />
   <property name="lib.dir" value="${project.dir}/../WEB-INF/lib" />
   <property name="package.file.jar" value="${build.dir}/client-extensions.jar" />
   <property name="package.file.zip" value="${build.dir}/client-extensions.zip" />
   <property name="alfresco.dir" value="c:/Alfresco/tomcat/webapps/alfresco/" />
   <property name="alfresco.lib.dir" value="${alfresco.dir}/WEB-INF/lib/" />

   <path id="class.path">
      <dirset dir="${build.dir}" />
      <fileset dir="../../lib/server" includes="**/*.jar" />
   </path>

   <target name="compile">
      <mkdir dir="${build.dir}" />
      <javac classpathref="class.path" srcdir="${project.dir}/src" destdir="${build.dir}" />
   </target>

   <target name="package-jar" depends="compile">
      <delete file="${package.file.jar}" />
      <jar destfile="${package.file.jar}">
         <fileset dir="${build.dir}" excludes="*.zip" />
      </jar>
   </target>

   <target name="package-extension" depends="package-jar">
      <delete file="${package.file.zip}" />
      <zip destfile="${package.file.zip}">
         <zipfileset file="${package.file.jar}" prefix="WEB-INF/lib" />
         <zipfileset dir="${web.dir}" />
      </zip>
      <copy file="${package.file.jar}" todir="${lib.dir}" />
   </target>

   <target name="integrate-extension" depends="package-extension">
      <available file="alfresco.war" type="file" property="alfresco.war.present" />
      <fail unless="alfresco.war.present" message="Could not find alfresco.war, please copy it to ${basedir}" />
      <zip destfile="alfresco.war" update="true">
         <zipfileset file="${package.file.jar}" prefix="WEB-INF/lib" />
         <zipfileset dir="${web.dir}" />
         <!–zipfileset file="${project.dir}/src/WEB-INF/classes/alfresco/mimetype/openoffice-document-formats.xml" prefix="WEB-INF/classes/alfresco/mimetype" /–>
      </zip>
   </target>

   <target name="copy jar" description="copy files to alfresco lib dir" depends="package-jar">
      <copy todir="${alfresco.lib.dir}" overwrite="true">
         <fileset dir="${build.dir}/">
            <include name="*.jar" />
         </fileset>
      </copy>
   </target>

   <target name="deploy" description="copy files to alfresco lib dir">
      <unzip src="${package.file.zip}" dest="${alfresco.dir}" />
   </target>

</project>


I can build the project, creates an empty jar file and zip file with a jar file and jsp files in there, with a warning below:
Buildfile: C:\temp\Projects\alfresco\client-extensions\build.xml
compile:
package-jar:
   [delete] Deleting: C:\temp\Projects\alfresco\client-extensions\build\client-extensions.jar
      [jar] Warning: skipping jar archive C:\temp\Projects\alfresco\client-extensions\build\client-extensions.jar because no files were included.
      [jar] Building MANIFEST-only jar: C:\temp\Projects\alfresco\client-extensions\build\client-extensions.jar
package-extension:
   [delete] Deleting: C:\temp\Projects\alfresco\client-extensions\build\client-extensions.zip
      [zip] Building zip: C:\temp\Projects\alfresco\client-extensions\build\client-extensions.zip
     [copy] Copying 1 file to C:\temp\Projects\alfresco\WEB-INF\lib
BUILD SUCCESSFUL
Total time: 219 milliseconds

I would also prefer if you can email me a sample project to do this if any of you have done it, would be very helpful as well. my email address is km70569w@yahoo.com. Thanks for any assistance.

KM
4 REPLIES 4

webraccoon
Champ in-the-making
Champ in-the-making
Hi km,

i 'm also new in alfresco and try to getting started with it by reading the alfresco developers guide.
it seems, i have almost the same problems as vou have (resp. had?) .

first, where did you get the files build.properties.sample, someco-logo.png, etc.?
the only files i found were login.jsp and relogin.jsp.

did you resolve your deployment problems?
greetings,
André

bookworm2113
Champ in-the-making
Champ in-the-making
Here are the details
This ought to work

this is build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="SomeCo Client Extensions ch2" default="deploy" basedir=".">
   <property file="build.properties" />

   <property name="label" value="ch2" />
   <property name="project.dir" value="." />
   <property name="build.dir" value="${project.dir}/build" />
   <property name="bin.dir" value="${project.dir}/bin" />
   <property name="project.name" value="someco-client-extensions" />
   <property name="package.file.zip" value="${build.dir}/${project.name}.zip" />
   <property name="package.file.jar" value="${build.dir}/${project.name}.jar" />
   <property name="project.file.zip" value="${build.dir}/${project.name}-project-${label}.zip" />
    <property name="package.file.amp" value="${build.dir}/${project.name}.amp" />
    <property name="module.id" value="com.someco.module.extensions.Core" />
    <property name="module.dir" value="/alfresco/module" />
   <property name="source.dir" value="${project.dir}/src" />
   <property name="config.dir" value="${project.dir}/config" />
   <property name="data.dir" value="${project.dir}/data" />
   <property name="web.dir" value="${source.dir}/web" />
   <property name="extension.dir" value="/alfresco/extension" />

   <path id="classpath.server">
      <fileset dir="${alfresco.sdk.dir}/server" includes="**/*.jar" />
   </path>

   <path id="classpath.remote">
      <fileset dir="${alfresco.sdk.dir}/remote" includes="**/*.jar" />
   </path>   

   <path id="classpath.build">
       <fileset dir="${build.dir}" includes="**/*.jar" />
    </path>
   
   <target name="clean" description="Removes all generated files">
      <delete dir="${build.dir}" />
      <delete dir="${bin.dir}" />      
   </target>

   <target name="clean-tomcat" description="Removes deployed extension directory, lib/someco*.jar, and someco/" >
      <delete dir="${alfresco.web.dir}/WEB-INF/classes/alfresco/extension" />
      <delete dir="${alfresco.web.dir}/WEB-INF/classes/alfresco/module" />
      <delete dir="${alfresco.web.dir}/jsp/extension" />
      <delete dir="${alfresco.web.dir}/someco" />
      <delete file="${alfresco.web.dir}/WEB-INF/lib/someco-alfresco.jar" />
   </target>

   <target name="setup" description="Creates the ${build.dir} and ${bin.dir} directories">
      <mkdir dir="${build.dir}" />
      <mkdir dir="${bin.dir}" />      
   </target>

   <target name="package-extension" depends="setup, package-jar" description="Creates a zip called ${package.file.zip} which can be unzipped on top of an exploded Alfresco web app">
      <delete file="${package.file.zip}" />
      <zip destfile="${package.file.zip}" update="true">
         <zipfileset dir="${config.dir}${extension.dir}" prefix="WEB-INF/classes${extension.dir}" />
         <zipfileset file="${package.file.jar}" prefix="WEB-INF/lib" />
         <zipfileset dir="${web.dir}" excludes="META-INF/**" />
      </zip>
   </target>
   
   <target name="package-amp" depends="setup, package-jar" description="Packages the customizations as an Alfresco module in ${package.file.amp}">
      <delete file="${package.file.amp}" />
      <zip destfile="${package.file.amp}">
         <zipfileset file="${package.file.jar}" prefix="lib" />
         <zipfileset dir="${web.dir}" prefix="web" />
         <zipfileset file="${config.dir}${module.dir}/${module.id}/module.properties" />                  
         <zipfileset file="${config.dir}${module.dir}/${module.id}/file-mapping.properties" />
         <zipfileset file="${config.dir}${module.dir}/${module.id}/module-context.xml" prefix="config${module.dir}/${module.id}" />
         <zipfileset file="${config.dir}${module.dir}/${module.id}/someco-core.properties" prefix="config${module.dir}/${module.id}" />         
         <zipfileset dir="${data.dir}" prefix="config${module.dir}/${module.id}/bootstrap" />
         <zipfileset dir="${config.dir}${extension.dir}/model" prefix="config${module.dir}/${module.id}/model" />
          <!–<zipfileset file="${config.dir}${extension.dir}/someco-model-context.xml" prefix="config${module.dir}/${module.id}" />–>
         <zipfileset file="${config.dir}${extension.dir}/web-client-config-custom.xml" prefix="config${module.dir}/${module.id}/ui" />         
      </zip>
   </target>
   
   <target name="install-amp" depends="package-amp" description="Uses the Alfresco MMT to install the AMP into ${alfresco.war.path}">
        <java dir="." fork="true" classname="org.alfresco.repo.module.tool.ModuleManagementTool">
         <classpath refid="classpath.server"/>
            <arg line="install ${package.file.amp} ${alfresco.war.path} -force -verbose"/>
        </java>
    </target>
   
    <target name="deploy-amp" depends="install-amp" description="Unzips the AMP'd WAR file into ${alfresco.web.dir}">
         <unzip src="${alfresco.war.path}" dest="${alfresco.web.dir}" />
    </target>

   <target name="deploy" depends="package-extension" description="Unzips the ${package.file.zip} into ${alfresco.web.dir}">
      <unzip src="${package.file.zip}" dest="${alfresco.web.dir}" />
   </target>

   <target name="zip-project" depends="setup" description="Zips the entire Eclipse project as-is into ${project.file.zip}">
      <delete file="${project.file.zip}" />
      <zip destfile="${project.file.zip}">
         <zipfileset dir="${project.dir}" excludes="build/** bin/**" prefix="${project.name}-${label}" />
      </zip>
   </target>   

   <target name="compile" description="Compiles src to ${bin.dir}">
      <mkdir dir="${bin.dir}" />
      <javac srcdir="${source.dir}/java" destdir="${bin.dir}" source="1.5" target="1.5" debug="on" fork="yes" deprecation="on">
         <classpath refid="classpath.server"/>
         <classpath refid="classpath.remote"/>
      </javac>
      <!– copy in non-compiled files like props if needed –>
      <copy todir="${bin.dir}">
         <fileset dir="${source.dir}/java" excludes="**/*.java"/>
      </copy>
   </target>
   
   <target name="package-jar" depends="setup, compile"
      description="Jars up the compiled classes and ${web.dir}/META-INF into ${package.file.jar}">
         <delete file="${package.file.jar}" />
         <jar destfile="${package.file.jar}">
            <fileset dir="${bin.dir}" includes="com/**" />
            <zipfileset dir="${web.dir}/META-INF" excludes="*.zip" prefix="META-INF" />            
         </jar>
   </target>
   
   <target name="data-creator" depends="package-jar" >
      <java dir="./bin" fork="true" classname="com.someco.examples.SomeCoDataCreator">
         <classpath refid="classpath.build"/>
         <classpath refid="classpath.remote"/>
            <arg line="admin admin /app:company_home/cm:Someco/cm:Marketing/cm:Whitepapers whitepaper whitepaper"/>
        </java>
    </target>

   <target name="data-relater" depends="package-jar" description="Run the Someco web services examples">
      <java dir="./bin" fork="true" classname="com.someco.examples.SomeCoDataRelater">
         <classpath refid="classpath.build"/>
         <classpath refid="classpath.remote"/>
            <arg line="admin admin ${sourceId} ${targetId}"/>
        </java>
    </target>

   <target name="data-queries" depends="package-jar" description="Run the Someco web services examples">
      <java dir="./bin" fork="true" classname="com.someco.examples.SomeCoDataQueries">
         <classpath refid="classpath.build"/>
         <classpath refid="classpath.remote"/>
            <arg line="admin admin /app:company_home/cm:Someco/cm:Marketing/cm:Whitepapers"/>
        </java>
    </target>

   <target name="data-cleaner" depends="package-jar" description="Run the Someco web services examples">
      <java dir="./bin" fork="true" classname="com.someco.examples.SomeCoDataCleaner">
         <classpath refid="classpath.build"/>
         <classpath refid="classpath.remote"/>
            <arg line="admin admin /app:company_home/cm:Someco/cm:Marketing/cm:Whitepapers whitepaper"/>
        </java>
    </target>
   
</project>

this is build.properties
alfresco.sdk.dir=C:/Alfresco/sdk/lib
alfresco.web.dir=C:/Alfresco/tomcat/webapps/alfresco

The alfresco.sdk.dir has to be the path to your sdk. The book talks about setting up your sdk, I followed the same instructions.

this is faces-config.xml
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
                              "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>

   <!– *************************************************************** –>
   <!– Empty JSF config file to prevent errors being thrown during JSF –>
   <!– initialisation. Overwrite this file with your custom version.   –>
   <!– *************************************************************** –>
   <navigation-rule>
      <description>
         The decision rule used by the NavigationHandler to
         determine which view must be displayed after the
         current view, login.jsp is processed.
      </description>
      <from-view-id>/jsp/extension/login.jsp</from-view-id>
      <navigation-case>
         <description>
             Indicates to the NavigationHandler that the browse.jsp
             view must be displayed if the Action referenced by a
             UICommand component on the login.jsp view returns
             the outcome "success".
         </description>
         <from-outcome>success</from-outcome>
         <to-view-id>/jsp/browse/browse.jsp</to-view-id>
      </navigation-case>
   </navigation-rule>

   <!– rule to get back to the login page from anywhere –>
   <navigation-rule>
      <from-view-id>/jsp/*</from-view-id>
      <navigation-case>
         <from-outcome>logout</from-outcome>
         <to-view-id>/jsp/extension/login.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
         <from-outcome>relogin</from-outcome>
         <to-view-id>/jsp/extension/relogin.jsp</to-view-id>
      </navigation-case>
   </navigation-rule>
  
</faces-config>

login.jsp
<%–
* Copyright (C) 2005-2007 Alfresco Software Limited.

* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.

* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.

* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

* As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception.  You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing"
–%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>

<%@ page import="org.alfresco.web.app.servlet.AuthenticationHelper" %>
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
<%@ page import="javax.servlet.http.Cookie" %>

<%@ page buffer="16kb" contentType="text/html;charset=UTF-8" %>
<%@ page isELIgnored="false" %>

<%
Cookie authCookie = AuthenticationHelper.getAuthCookie(request);

// remove the username cookie value if explicit logout was requested by the user
if (session.getAttribute(AuthenticationHelper.SESSION_INVALIDATED) != null)
{
if (authCookie != null)
{
authCookie.setMaxAge(0);
response.addCookie(authCookie);
}
}
else
{
// setup value used by JSF bean state ready for login page if we find the cookie
if (authCookie != null && authCookie.getValue() != null)
{
session.setAttribute(AuthenticationHelper.SESSION_USERNAME, authCookie.getValue());
}
}
%>

<body bgcolor="#ffffff" style="background-image: url(<%=request.getContextPath()%>/images/logo/AlfrescoFadedBG.png); background-repeat: no-repeat; background-attachment: fixed">

<r:page titleId="title_login">

<f:view>
<%– load a bundle of properties I18N strings here –%>
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>

<h:form acceptcharset="UTF-8" id="loginForm" >

<table width=100% height=98% align=center>
<tr width=100% align=center>
<td valign=middle align=center width=100%>

<table cellspacing=0 cellpadding=0 border=0>
<tr><td width=7><img src='<%=request.getContextPath()%>/images/parts/white_01.gif' width=7 height=7 alt=''></td>
<td background='<%=request.getContextPath()%>/images/parts/white_02.gif'>
<img src='<%=request.getContextPath()%>/images/parts/white_02.gif' width=7 height=7 alt=''></td>
<td width=7><img src='<%=request.getContextPath()%>/images/parts/white_03.gif' width=7 height=7 alt=''></td>
</tr>
<tr><td background='<%=request.getContextPath()%>/images/parts/white_04.gif'>
<img src='<%=request.getContextPath()%>/images/parts/white_04.gif' width=7 height=7 alt=''></td><td bgcolor='white'>

<table border=0 cellspacing=4 cellpadding=2>
<tr>
<td colspan=2>
<img src='<%=request.getContextPath()%>/someco/images/someco-logo.png' width=202 height=58 alt="SomeCo" title="SomeCo">
</td>
</tr>

<tr>
<td colspan=2>
<span class='mainSubTitle'><h:outputText value="#{msg.login_details}" />:</span>
</td>
</tr>

<tr>
<td>
<h:outputText value="#{msg.username}"/>:
</td>
<td>
<%– input text field, with an example of a nested validator tag –%>
<h:inputText id="user-name" value="#{LoginBean.username}" validator="#{LoginBean.validateUsername}" style="width:150px" />
</td>
</tr>

<tr>
<td>
<h:outputText value="#{msg.password}"/>:
</td>
<td>
<%– password text field, with an example of a validation bean method –%>
<%– the validation method adds a faces message to be displayed by a message tag –%>
<h:inputSecret id="user-password" value="#{LoginBean.password}" validator="#{LoginBean.validatePassword}" style="width:150px" />
</td>
</tr>

<tr>
<td>
<h:outputText value="#{msg.language}"/>:
</td>
<td>
<%– language selection drop-down –%>
<h:selectOneMenu id="language" value="#{UserPreferencesBean.language}" style="width:150px" onchange="document.forms['loginForm'].submit(); return true;">
<f:selectItems value="#{UserPreferencesBean.languages}" />
</h:selectOneMenu>
</td>
</tr>

<tr>
<td colspan="2" align=right>
<h:outputText value="#{AboutBean.version}"/>
<h:commandButton id="submit" action="#{LoginBean.login}" value="#{msg.login}" />
</td>
</tr>

<tr>
<td colspan=2>
<%– messages tag to show messages not handled by other specific message tags –%>
<h:messages style="padding-top:8px; color:red; font-size:10px" layout="table" />
</td>
</tr>
</table>

</td><td background='<%=request.getContextPath()%>/images/parts/white_06.gif'>
<img src='<%=request.getContextPath()%>/images/parts/white_06.gif' width=7 height=7 alt=''></td></tr>
<tr><td width=7><img src='<%=request.getContextPath()%>/images/parts/white_07.gif' width=7 height=7 alt=''></td>
<td background='<%=request.getContextPath()%>/images/parts/white_08.gif'>
<img src='<%=request.getContextPath()%>/images/parts/white_08.gif' width=7 height=7 alt=''></td>
<td width=7><img src='<%=request.getContextPath()%>/images/parts/white_09.gif' width=7 height=7 alt=''></td></tr>
</table>

<div id="no-cookies" style="display:none">
<table cellpadding="0" cellspacing="0" border="0" style="padding-top:16px;">
<tr>
<td>
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc"); %>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td valign=top style="padding-top:2px" width=20><h:graphicImage url="/images/icons/info_icon.gif" width="16" height="16"/></td>
<td class="mainSubText">
<h:outputText value="#{msg.no_cookies}" />
</td>
</tr>
</table>
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner"); %>
</td>
</tr>
</table>
</div>
<script>
document.cookie="_alfTest=_alfTest"
var cookieEnabled = (document.cookie.indexOf("_alfTest") != -1);
if (cookieEnabled == false)
{
document.getElementById("no-cookies").style.display = 'inline';
}
</script>

</td>
</tr>

</table>

</h:form>
</f:view>

<script>

if (document.getElementById("loginForm:user-name").value.length == 0)
{
document.getElementById("loginForm:user-name").focus();
}
else
{
document.getElementById("loginForm:user-password").focus();
}

</script>

</r:page>

</body>

relogin.jsp
<%–
* Copyright (C) 2005-2007 Alfresco Software Limited.

* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.

* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.

* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

* As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception.  You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing"
–%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>

<%@ page import="org.alfresco.web.app.servlet.AuthenticationHelper" %>
<%@ page import="javax.servlet.http.Cookie" %>

<%@ page buffer="16kb" contentType="text/html;charset=UTF-8" %>
<%@ page isELIgnored="false" %>

<%
// remove the username cookie value if explicit logout was requested by the user
if (session.getAttribute(AuthenticationHelper.SESSION_INVALIDATED) != null)
{
Cookie authCookie = AuthenticationHelper.getAuthCookie(request);
if (authCookie != null)
{
authCookie.setMaxAge(0);
response.addCookie(authCookie);
}
}
%>

<body bgcolor="#ffffff" style="background-image: url(<%=request.getContextPath()%>/images/logo/AlfrescoFadedBG.png); background-repeat: no-repeat; background-attachment: fixed">

<r:page titleId="title_relogin">

<f:view>
<%– load a bundle of properties I18N strings here –%>
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>

<h:form acceptcharset="UTF-8" id="loggedOutForm" >

<table width=100% height=90% align=center>
<tr width=100% align=center>
<td valign=middle align=center width=100%>

<table cellspacing=0 cellpadding=0 border=0>
<tr><td width=7><img src='<%=request.getContextPath()%>/images/parts/white_01.gif' width=7 height=7 alt=''></td>
<td background='<%=request.getContextPath()%>/images/parts/white_02.gif'>
<img src='<%=request.getContextPath()%>/images/parts/white_02.gif' width=7 height=7 alt=''></td>
<td width=7><img src='<%=request.getContextPath()%>/images/parts/white_03.gif' width=7 height=7 alt=''></td>
</tr>
<tr><td background='<%=request.getContextPath()%>/images/parts/white_04.gif'>
<img src='<%=request.getContextPath()%>/images/parts/white_04.gif' width=7 height=7 alt=''></td><td bgcolor='white'>

<table border=0 cellspacing=4 cellpadding=2>
<tr>
<td align=center>
<img src='<%=request.getContextPath()%>/someco/images/someco-logo.png' width=202 height=58 alt="SomeCo" title="SomeCo">
</td>
</tr>

<tr>
<td align=center>
<span class='mainSubTitle'><h:outputText value="#{msg.loggedout_details}" /></span>
</td>
</tr>

<tr>
<td align=center>
<a:actionLink href="/faces/jsp/browse/browse.jsp" value="#{msg.relogin}" />
</td>
</tr>
</table>

<%– messages tag to show messages not handled by other specific message tags –%>
<h:messages style="padding-top:8px; color:red; font-size:10px" layout="table" />

</td><td background='<%=request.getContextPath()%>/images/parts/white_06.gif'>
<img src='<%=request.getContextPath()%>/images/parts/white_06.gif' width=7 height=7 alt=''></td></tr>
<tr><td width=7><img src='<%=request.getContextPath()%>/images/parts/white_07.gif' width=7 height=7 alt=''></td>
<td background='<%=request.getContextPath()%>/images/parts/white_08.gif'>
<img src='<%=request.getContextPath()%>/images/parts/white_08.gif' width=7 height=7 alt=''></td>
<td width=7><img src='<%=request.getContextPath()%>/images/parts/white_09.gif' width=7 height=7 alt=''></td></tr>
</table>

</td>
</tr>
</table>

</h:form>
</f:view>

</r:page>

</body>

scModel.xml
<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="sc:somecomodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <!– Optional meta-data about the model –>
   <description>Someco Model</description>
   <author>Optaros</author>
   <version>1.0</version>

   <!– Imports are required to allow references to definitions in other models –>
   <imports>
      <!– Import Alfresco Dictionary Definitions –>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
      <!– Import Alfresco Content Domain Model Definitions –>
      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
      <import uri="http://www.alfresco.org/model/system/1.0" prefix="sys" />
   </imports>

   <!– Introduction of new namespaces defined by this model –>
   <namespaces>
      <namespace uri="http://www.someco.com/model/content/1.0" prefix="sc" />
   </namespaces>

   <types>
      <!– Enterprise-wide generic document type –>
      <type name="sc:doc">
         <title>Someco Document</title>
         <parent>cm:content</parent>
      </type>

      <type name="sc:marketingDoc">
         <title>Someco Marketing Document</title>
         <parent>sc:doc</parent>
      </type>

      <type name="sc:whitepaper">
         <title>Someco Whitepaper</title>
         <parent>sc:marketingDoc</parent>
      </type>      
   </types>

</model>

someco-model-context.xml
<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="sc:somecomodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <!– Optional meta-data about the model –>
   <description>Someco Model</description>
   <author>Optaros</author>
   <version>1.0</version>

   <!– Imports are required to allow references to definitions in other models –>
   <imports>
      <!– Import Alfresco Dictionary Definitions –>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
      <!– Import Alfresco Content Domain Model Definitions –>
      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
      <import uri="http://www.alfresco.org/model/system/1.0" prefix="sys" />
   </imports>

   <!– Introduction of new namespaces defined by this model –>
   <namespaces>
      <namespace uri="http://www.someco.com/model/content/1.0" prefix="sc" />
   </namespaces>

   <types>
      <!– Enterprise-wide generic document type –>
      <type name="sc:doc">
         <title>Someco Document</title>
         <parent>cm:content</parent>
      </type>

      <type name="sc:marketingDoc">
         <title>Someco Marketing Document</title>
         <parent>sc:doc</parent>
      </type>

      <type name="sc:whitepaper">
         <title>Someco Whitepaper</title>
         <parent>sc:marketingDoc</parent>
      </type>      
   </types>

</model>

web-client-config-custom.xml
<alfresco-config>
   <config>
      <client>
         <!– the login page the client will use –>
         <login-page>/jsp/extension/login.jsp</login-page>
      </client>
   </config>

   <!– show related documents association on doc property sheet –>
   <config evaluator="node-type" condition="sc:doc">
      <property-sheet>
         <show-association name="sc:relatedDocuments" />
      </property-sheet>
   </config>

   <!–  add someco types to add content list –>
   <config evaluator="string-compare" condition="Content Wizards">
      <content-types>
         <type name="sc:doc" />
         <type name="sc:whitepaper" />
      </content-types>
   </config>

   <config evaluator="string-compare" condition="Action Wizards">

      <!– The list of types shown in the is-subtype condition –>
      <subtypes>
         <type name="sc:doc" />
         <type name="sc:whitepaper" />
      </subtypes>      

      <!– The list of content and/or folder types shown in the specialise-type action –>
      <specialise-types>
         <type name="sc:doc" />
         <type name="sc:whitepaper" />
      </specialise-types>      
   </config>   
   
   <config evaluator="string-compare" condition="Advanced Search">
      <advanced-search>
         <content-types>
            <type name="sc:doc" />
            <type name="sc:whitepaper" />
         </content-types>
      </advanced-search>
   </config>
   
</alfresco-config>

Don't forget to import you image, the .png file
The project also depends on "SDK Alfresco Embedded"

anitha
Champ in-the-making
Champ in-the-making
Hello all,

I followed the steps given in the Alfresco Developer Guide by Jeff Potts to deploy a simple customization. I could do everything as explained in the book till step 3. When i wanted to carry out the 4th step, i found that i don't have build.properties file anywhere in my exploded alfresco directories.

May i know where exactly is build.properties located?

In case i have to create build.properties on my own where exactly should i be placing it in?

bookworm2113
Champ in-the-making
Champ in-the-making
You could create one if you don't have one already.
Read my earlier post for an example
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.