Recent Notes

Displaying notes 91 - 100
Created by Fang on November 08, 2011 20:55:00    Last update: November 21, 2011 18:19:44
In the simple taglib example , I used a tag handler class to implement a taglib. This is an example to implement a taglib with a UI component. The purpose is to use a custom tag to split a string and print each part in a separate paragraph, i.e., print <p>john</p> <p>steve</p> <p>mike</p> with custom tag <my:foreach> : <my:foreach var="who" value="john steve mike"> ... These are the files: pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0"... src/main/java/com/example/UIForeash.java : package com.example; import java.io.IOExcep... src/main/resources/META-INF/faces-config.xml : <?xml version="1.0" encoding="UTF-8"?> <faces-c... src/main/resources/META-INF/foreach.taglib.xml : <?xml version="1.0" encoding="UTF-8"?> <facelet... How to use: Put the JAR file generated by the above project in the WEB-INF/lib folder of the web app. If the web app is a Maven project, just add the taglib project as a dependency:...
Created by Fang on November 21, 2011 13:49:11    Last update: November 21, 2011 13:49:11
In the test for the simple taglib example , I used a literal string for the name attribute: <my:hello name="Jack"/> What happens if the name attribute contains EL expresson? For example: <my:hello name="#{param['name']}"/> If EL works, the tag should take the value of the " name " request parameter and print it out. But the tag as implemented in the simple taglib example prints the literal string: Hello #{param['name']}! I am FaceletTag. In order to make a tag to recognize EL, we have to use TagAttribute.getValue(FaceletContext ctx) instead of TagAttribute.getValue() . The latter returns the literal value of the attribute. The HelloTagHandler should be changed to: package com.example; import java.io.IOExcep... Rebuild the taglib and test with a URL like this: http://localhost:8080/facelet-test/?name=Jack The tag will print:...
Created by mee2 on November 20, 2011 21:25:28    Last update: November 20, 2011 21:25:40
I haven't tried this but the information is available here (for 4.0): http://docs.alfresco.com/4.0/topic/com.alfresco.enterprise.doc/concepts/solr-webapp-config.html
Created by mee2 on November 20, 2011 21:23:02    Last update: November 20, 2011 21:23:02
By default, alfresco.log is located in the current working directory (where you started Tomcat from). But you can override the default location with a custom lo4g.properties file: Create file $TOMCAT_HOME/shared/classes/alfresco/extension/custom-log4j.properties with contents: log4j.rootLogger=error, File log4j.appender... The Alfresco log will be relocated to /home/alfresco/logs (but somehow s small portion remains in the CWD). This works only when the shared.loader property in conf/catalina.properties includes ${catalina.home}/shared/classes .
Created by mee2 on November 20, 2011 21:00:58    Last update: November 20, 2011 21:10:22
Alfresco community-4.0.b has only 64-bit installer for Linux. These are the steps to manually install it on 32-bit Ubuntu Linux. Download alfresco-community-4.0.b.zip from http://wiki.alfresco.com/wiki/Download_and_Install_Alfresco . Install dependencies: $ sudo apt-get install imagemagick swftools postgr... Note: swftools was not available as a package for Ubuntu 11.10, I installed it with source . Create alfresco database: $ sudo bash [sudo] password for alfresco: ... Copy everything from the Alfresco web-server folder to Tomcat: $ cp -R alfresco-community-4.0.b/web-server/* apac... Edit $TOMCAT_HOME/conf/catalina.properties , change shared.loader to: shared.loader=${catalina.base}/shared/classes,${ca... Edit Tomcat conf file conf/server.xml , add URIEncoding="UTF-8" : <Connector port="8080" protocol="HTTP/1.1" ... Customize alfresco-global.properties : $ mv shared/classes/alfresco-global.properties.sam... Edit shared/classes/alfresco-global.properties : ############################### ## Common A... Copy keystore files from alfresco.war : expand alfresco.war , grab the whole keystore directory from...
Created by mee2 on November 20, 2011 20:26:05    Last update: November 20, 2011 20:26:34
Stack trace: Caused by: org.alfresco.error.AlfrescoRuntimeExcep... Cause: Location of Alfresco keystore changed via shared/classes/alfresco-global.properties but keystore files not exist. Solution : copy keystore files from alfresco.war : cp -R webapps/alfresco/WEB-INF/classes/alfresco/ke...
Created by mee2 on November 18, 2011 14:59:03    Last update: November 18, 2011 14:59:03
The usual command " sudo apt-get install swftools " did not work for Ubuntu 11.10 (oneiric), so I installed from source: Install dependencies: $ sudo apt-get install zlib1g-dev libgif-dev libfr... Get swftools source: $ wget http://swftools.org/swftools-0.9.1.tar.gz ... Build and install: $ ./configure $ make $ sudo make install
Created by voodoo on November 18, 2011 14:12:37    Last update: November 18, 2011 14:12:49
Search Ubuntu packages at: http://packages.ubuntu.com/
Created by balu on November 17, 2011 21:18:55    Last update: November 17, 2011 21:18:55
The tc server developer edition comes with insight bundled. However, without options, the tcruntime-instance.sh command creates a simple Tomcat instance without insight. To include insight in the instance, you have to specify the insight template ( --force replaces current instance with same name): $ tcruntime-instance.sh create --force -t insight
Created by balu on November 17, 2011 14:52:11    Last update: November 17, 2011 14:52:40
Stack trace: Exception in thread "main" java.lang.NullPointerEx... Cause: calling Class.forName with null argument. If argument is not null but class cannot be loaded, the stack trace is: Exception in thread "main" java.lang.ClassNotFound...
Previous  5 6 7 8 9 10 11 12 13 14 Next