To configure JSTL Core library with Liferay require following steps
Step 1 : Add jstl-api.jar and jstl-impl.jar into your liferay-plugin-package.properties file
/WEB-INF/liferay-plugin-package.properties
or
copy both these jars into your project - /WEB-INF/lib folder
Step 2 : Include following syntax to JSTL Core library in your JSP:
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
e.g Set attribute in your java class
Employee e1 =new Employee(1, "Tanaji", "Mumbai");
List<Employee> empList = new ArrayList<Employee>();
empList.add(e1);
request.setAttribute("employeeList", empList);
Now you can use JSTL tag directly in your JSP file like this....
<c:forEach var="emp" items="${employeeList}" >
Employee Name :-> <c:out value="${emp.name}"></c:out>
</c:forEach>
Sunday, 9 December 2012
Sunday, 11 November 2012
Running Two Tomcat Instances Under Same LIFERAY_HOME Directory
1) Configure different ports for each tomcat
2) If consider both the tomcat under following directory like
“…..../liferayHome/liferay-portal-6.1.1-ce-ga2-node1”
“…..../liferayHome/liferay-portal-6.1.1-ce-ga2-node2”
Here “liferayHome” is a home folder for both the tomcat server
3) Created two folders datanode1 and datanode2 under the “…..../liferayHome” home folder
“…..../liferayHome/datanode1”
“…..../liferayHome/datanode2”
4) Please add following properties in liferay-portal-6.1.1-ce-ga2-node1 portal-ext.properties file
liferay.home=…..../liferayHome
jdbc.default.url=jdbc:hsqldb:${liferay.home}/datanode1/hsql/lportal
lucene.dir=${liferay.home}/datanode1/lucene/
jcr.jackrabbit.repository.root=${liferay.home}/datanode1/jackrabbit
dl.hook.file.system.root.dir=${liferay.home}/datanode1/document_library
5) Please add following properties in liferay-portal-6.1.1-ce-ga2-node2 portal-ext.properties file
liferay.home=…..../liferayHome
jdbc.default.url=jdbc:hsqldb:${liferay.home}/datanode2/hsql/lportal
lucene.dir=${liferay.home}/datanode2/lucene/
jcr.jackrabbit.repository.root=${liferay.home}/datanode2/jackrabbit
dl.hook.file.system.root.dir=${liferay.home}/datanode2/document_library
6) Please restart both tomcats.
2) If consider both the tomcat under following directory like
“…..../liferayHome/liferay-portal-6.1.1-ce-ga2-node1”
“…..../liferayHome/liferay-portal-6.1.1-ce-ga2-node2”
Here “liferayHome” is a home folder for both the tomcat server
3) Created two folders datanode1 and datanode2 under the “…..../liferayHome” home folder
“…..../liferayHome/datanode1”
“…..../liferayHome/datanode2”
4) Please add following properties in liferay-portal-6.1.1-ce-ga2-node1 portal-ext.properties file
liferay.home=…..../liferayHome
jdbc.default.url=jdbc:hsqldb:${liferay.home}/datanode1/hsql/lportal
lucene.dir=${liferay.home}/datanode1/lucene/
jcr.jackrabbit.repository.root=${liferay.home}/datanode1/jackrabbit
dl.hook.file.system.root.dir=${liferay.home}/datanode1/document_library
5) Please add following properties in liferay-portal-6.1.1-ce-ga2-node2 portal-ext.properties file
liferay.home=…..../liferayHome
jdbc.default.url=jdbc:hsqldb:${liferay.home}/datanode2/hsql/lportal
lucene.dir=${liferay.home}/datanode2/lucene/
jcr.jackrabbit.repository.root=${liferay.home}/datanode2/jackrabbit
dl.hook.file.system.root.dir=${liferay.home}/datanode2/document_library
6) Please restart both tomcats.
Subscribe to:
Posts (Atom)