[HIPPO ] Spring – JCR configuration

October 26, 2009 in IT and Stuff

When I am investigating HIPPO CMS 7, I have to connect the web application that is using SPRING framework to hippo repository. This is what we’ve got.

class="org.apache.jackrabbit.rmi.client.ClientRepositoryFactory" />

factory-method="getRepository">

It works for us. Hopefully it works also for you.

Cheers!

Spring and Quartz configuration

October 26, 2009 in IT and Stuff

Quartz is an open source job scheduling system that can be integrated with, or used along side virtually any J2EE or J2SE application – from the smallest stand-alone application to the largest e-commerce system (definition taken from http://www.opensymphony.com/quartz/)

class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">

Cheers!

Spring – applicationContext.xml configuration

October 5, 2009 in IT and Stuff

It is my first time to configure my web application to use spring framework.

So, first time we create a applicationContext.xml under the WEB-INF folder. Below is the basic configuration

< ?xml version="1.0" encoding="UTF-8"?>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">

In the contexApplication.xml you can configure every bean that you need such as

After that, edit your web.xml which is also under the WEB-INF. Add these line to call the applicationContext.xml

contextConfigLocation /WEB-INF/applicationContext.xml

org.springframework.web.context.ContextLoaderListener

Even thought it is basic one, but hopefully it helps you to configure your web application with spring framework

Cheers!

Spring and Log4j

May 31, 2009 in IT and Stuff

First, we should define the location of the log4j config file or log4j property file. We define it in our web.xml

log4jConfigLocation /WEB-INF/log4j.properties

After that we add event declaration usign the element. This will be invoked when the event is occured. The element should be placed between and elements.

org.springframework.web.util.Log4jConfigListener

Setup Zend Framework into ur current Apache configuration

May 15, 2009 in IT and Stuff

There is a case when you have already setup your apache and php to specific DocumentRoot and Directory. But then you want to create a project which use Zend Framework.

For example you have already defined your DocumentRoot “D:/Project” And then you naturally will change the < Directory "D:/Project" > also.

Therefore when you want to add Zend Framework into it, it will never work (at least that is happening to me. )

Zend Framework require this kind of structure Zend

QuickStart/

—-application/

—-controllers/

—-views/

——–scripts/

—-library/

—-www/ —> this is your public directory that is accessible to the outside world.

Then you should edit your httpd.conf. Add VirtualHost definition into it.

e.g Listen 1010

< VirtualHost *:1010 > DocumentRoot “D:/Project/ZendQuickStart/www” < /VirtualHost >

Restart the server and type “http://localhost:1010″ in your browser. Voila, it works.

One more thing, Zend Framework use .htaccess therefore you should check your “AllowOverride” inside your httpd.conf. If the “AllowOverride” is set to “None”, then there is no way that it’s gonna work.

You should change “None” to “All” (at least I use All, I have not investigated why…but it works for now…later on I have to remind myself to investigate it.). So, you can have many “DocumentRoot” in your localhost, and you don’t have to be worry to edit the httpd.conf everytime you want to switch from your Project folder to ZendProject folder.

“php_mbstring.dll not found” problem

May 5, 2009 in IT and Stuff

After updating the AppServ to 2.5.10, I always getting errors that “php_mbstring.dll is not found”.

And when I click “Ok” button, it will say “php_exif is failed to load” in my CLI window.

Add “;” in front of php_mbstring.dll also does not work.

It returns another error.

After some googling, I found that actually the php_exif.dll needs php_mbstring.dll. Then, it means that we have to define the php_mbstring.dll and then php_exif.dll. But when I look into the php.ini, it’s actually the other way around.

Therefore, I move the php_exif.dll and put it after the php_mbstring.dll. Now, it returns no error anymore. But, my question now is….why the php guy make this kind of error? They should fix it.