Create
your own Portlet Container
1.
Download
portlet-container-configurator.jar
from
2.
Get fresh Copy of Tomcat6.0
Configuration
Now
from the jar you can configure your server to Portlet-containter in
two way
- Using GUI
- From Command Line
1.
From GUI
java
-jar portlet-container-configurator.jar
- You can choose container from select menu, select Tomcat6. (you can select GlassFish, Tomcat5, etc ,as shown in screen)
- Set the Ant Home path
- Same as Set Container Home Directory for Tomcat
- C:\Apache-tomcat-6.0.35\
- Domain Directory
- C:\Apache-tomcat-6.0.35\webapps
Click
on the “Ok” button.
2.
From Command Line
java
-jar portlet-container-configurator.jar <webcontainer-install-dir>
<domain-dir/webapps> <ContainerName> <ANT_HMOE>
<webcontainer-install-dir>
location of installed WebContainer, ex:
C:\Apache-tomcat-6.0.35\
<domain-dir/webapps>
path upto webapps folder, ex:
C:\Apache-tomcat-6.0.35\webapps
<ContainerName>
container can be one of tomcat, tomcat6, jetty, weblogic. Here in our case it is tomcat6.
java
-jar portlet-container-configurator.jar
C:\Apache-tomcat-6.0.35
C:\Apache-tomcat-6.0.35\webapps
tomcat6 C:\ANT\
Now
Goto the WebContainer(tomcat6/bin) and restart/start the server.
Hit
the URL in Browser
You
can see two tab in portlet container driver. Portles and Admin
From
Admin tab User can deploy Portlet as well configure the portles and
create a New portlet window.
One
can also assing role to portlets.
By
Default portlet container store the data in file system, you can
configure Database for saving data.
Just
change the configuration file 'DriverConfig.properties' located at
C:\apache-tomcat-6.0.35\portlet-container\config\
DriverConfig.properties
The
Default configuration is
persistenceType=file
#
Specify the properties if the persistence type is
database
jdbc.url=jdbc:derby:portletdriver;create=true
jdbc.driver=org.apache.derby.jdbc.EmbeddedDriver
jdbc.user=
jdbc.password=
change
to
persistenceType=database
#
For
MySQL
jdbc.url=jdbc:mysql://localhost/portletdriver
jdbc.driver=com.mysql.jdbc.Driver
jdbc.user=root
jdbc.password=root