Wednesday, November 29, 2006

Creating Virtual Portal in eXo Portal

I hope this will be another interesting topic for eXo portal users.

Here I am planning to share how to create virtual portal in eXo portal.

Following steps has to be done in order to create Virtual Portal in eXo portal:

* Changes have to be made in the following XML files. find the following XML’s
portal-configuration.xml & users-
from the following place
eXo_Home\webapps\portal\WEB-INF\conf Make new user details for example bala entries just similar to exo user.
* New XML files has to be added in the following place.
i> Copy exo-config.xml,exo-navigation.xml & exo-pages.xml from
eXo_Home\webapps\portal\WEB-INF\conf\users & paste it in the same place
ii> Rename new xml files to bala-config.xml,bala-navigation.xml & bala- pages.xml .
iii> Change content exo to bala in all above new XML’s.
iv> Restart the server & login as portal admin & check in the management portlet whether you can see the new user with the name of bala.
v> By login as user bala you can change your portal as per your needs.

* Now by using the following URL you can access the new virtual portal i.e., before login


Wednesday, September 20, 2006

Edit_Defaults Mode in Websphere Portal 6.0.

Its nice to post after long time with one interesting topic.which is nothing but edit_defaults mode in JSR 168.I think lots of portlet developers having idea about view, edit,help & config mode.But some more modes are avaialble in JSR 168.Among this one of the interesting mode is Edit_Defaults .I explored some basic things of Edit_Defaults in websphere portal 6.0 & Through this post i just want to share what ever i learn about Edit_Defaults mode.

At first let us see what is edit defaults mode ?

  • Edit Defaults mode is one of the portlet mode available in JSR 168(Portlet API) .
  • This mode is created to share some default preference values to all the users. (i.e., If admin set some preference values by using this edit defaults mode then this values will be a default preference values for all other users.)
  • Any time admin can change others preference values by using this shared settings option.(i.e., if any body selected some theme if admin changes the theme by using this edit defaults mode then automatically it will reflect for all other users.)
  • This mode will be applicable only for portal admin not for all users.
what are the things we need to do for getting this mode ?
  • You need make the following entry in portlet.xml



<custom-portlet-mode><description xml:lang="en">edit_defaults mode</description><portlet-mode>edit_defaults</portlet-mode></custom-portlet-mode>


You need to override doDispatch() of Generic Portlet. Sample code

// Added for Edit_Default_Mode

private static final PortletMode EDIT_DEFAULT_MODE = new PortletMode("edit_defaults");

protected void doDispatch(RenderRequest request, RenderResponse response) throws PortletException, IOException {if( !WindowState.MINIMIZED.equals(request.getWindowState()) ){

PortletMode mode = request.getPortletMode();

if( EDIT_DEFAULT_MODE.equals(mode) ) {

// System.out.println("Inside edit default mode condition : Bala S Murugan ::: ); doCustomConfigure(request, response);return;}}super.doDispatch(request, response);


Well once you create your portlet with edit_defaults mode then after deploying in websphere portal 6.0.If you login as a portal admin then you will see a new link "EDIT SHARED SETTINGS" in your portlet title bar.Where This "EDIT SHARED SETTINGS" is nothing but Edit_Defaults in Websphere 6.0.

Tuesday, January 03, 2006

Configuration in eXo Portal

Most of the changes are to be made in install_dir/exo-tomcat/web-apps/portal directory. This is a directory, which is already present in the exo-tomcat when you download it.

Creating A New Portal Instance :

  • In exo-tomcat/conf/Catalina/localhost/ copy the portal.xml to myportal.xml and edit it. You need at least change the context path and docbase to avoid the name collision with the one of the portal. You need to change the database configuration as well since each portal instance should have its own database.
  • Copy the portal.war in exo-tomcat/webapps to myportal.war, the name must be matched with the context path you specify in the myportal.xml.
  • Edit the web.xml file and change the display-name tag value to myportal
    Launch your tomcat and access

Database Configuration Or Migrating the default Database to a new Database: Currently, the supported databases are:

  1. MySQL
  2. HSQL
  3. Postgresql
  4. DB2
  5. Oracle
  6. Microsoft SQL Server
  • Changing the database is quite simple, you just need to replace an XML file (that configures the J2EE Datasources) and add the database driver in the classpath of your application server.
  • The eXo Platform defines two datasource by default: one for the portal and one for the workflow. Tomcat
  • In Tomcat 5, the datasource configuration XML files are located under TOMCAT_DIST/conf/Catalina/localhost.
  • Each portal instance has to define the datasource it will use. The portalInstanceName.xml files contain that information. To change the database used you have to customize those files.
  • To ease the change, we provide several template files like portal.xml.mysql or portal.xml.postgresql. Pick up the one you want and rename it to portal.xml (overide the default one that contains hsql configuration). Of course, you will have to customize your personal database information - like username, password and DB URI - by editing the file.
  • Then you finally have to add the database driver in tomcat TOMCAT_DIST/common/lib directory. Changes in Default Database::
  • In Exo, you will not get the default database because it is generated on the fly when the exo-tomcat server starts. But you will get the script file, which acts as a default database. The location of default database is : install_dir/exo-tomcat/temp/data/portal.script
  • Exo uses hsqldb as its default database and to see the tables you have to use hsqldb front .Now if you want to change the database, and then you should first download an hsqldb package. In its demo directory, there is a file. Double click on it, and choose the hsql standalone driver, and make the path point to the db (usually in the /exo-tomcat/temp/exo or /exo-tomcat/temp/portal) and open it, then you can use any sql line to change it, and make sure shutdown your tomcat first, because the db can"t be opened by two client instance.
  • Whenever you want to add some additional fields, which are related to user, you can user exo_user_profile table in the portal.script.
  • If you change the config.xml,then you should delete all the db files in the tomcat/temp directory,b/c every first time the exo run,it will import all the config.xml like files into the db(jcr),and don"t take care of them in the disk anymore.