I did try those steps but nothing seems to be working..
I am aware of JBoss Tools for portlet creation.
I did create a dynamic web project and added a portlet facet in Eclipse. In the $GATEIN_HOME/gatein/log folder, I checked out the log file and saw there was a NoClassDefFound error, although in the default catalina.log file I saw that portlet was deployed without any errors..
I am unable to see the portlet in the application registry also. Not understanding what's going wrong!
.war files are to be placed in the webapps directory right?
I develop portlet under eclipse, with GateIn and tomcat so :
Create a new environment in eclipse pointing on GateIn-Tomcat location.
In your vm arguments launch configuration I have this :
-Dcatalina.base="C:\Users\Juju\Travail\ProgramFiles\GateIn-3.1.0-GA" -Dcatalina.home="C:\Users\Juju\Travail\ProgramFiles\GateIn-3.1.0-GA" -Dwtp.deploy="C:\Users\Travail\ProgramFiles\GateIn-3.1.0-GA\webapps" -Djava.endorsed.dirs="C:\Users\Travail\ProgramFiles\GateIn-3.1.0-GA\endorsed" -Dexo.conf.dir="C:\Users\Travail\ProgramFiles\GateIn-3.1.0-GA\gatein\conf" -Xms1024m -Xmx2048m -XX:MaxPermSize=768m -Dcom.sun.management.jmxremote -Dexo.product.developing=true -Dorg.exoplatform.container.configuration.debug -Djava.security.auth.login.config=C:\Users\Travail\ProgramFiles\GateIn-3.1.0-GA\conf\jaas.conf
Now run your server, it works!!
For a simple portlet you have many exemple on the internet...
Thank you Deruere!
I tried including the VM arguments in server configuration, but it didn't work for me, or probably I am doing something wrong! Nevertheless, I would like to know the importance of including these arguments. What purpose do they actually serve?
I could finally deploy a custom portlet in GateIn, but using another way. Following are the steps:
1) Export the Web Portlet Project in Eclipse as a WAR file to the $GATEIN_HOME/webapps folder.
2) Restart GateIn-Tomcat
3) Point the browser to the url http://localhost:8080/portal
4) Login as root (root/gtn)
5) Navigate to the Application Registry
6) In the categories, you should be able to see your Web Portlet Project as a "category"
7) Navigate to Edit Page Layout
8) Add your application to the page
9) Your portlet would have been displayed on the portal home page!
Do we need export prject as a war in the $GATEIN_HOME/webapps folder? It seems Gatein Application Registry can't find the projects added to WTP server started in Eclipse.
Just figured out how to run/debug in Eclipse.
1. run your wtp project in a tomcat server (base a GateIn 3.1 installation)
2. change the server configuration,set Server location to: $GATEIN_HOME, deplopy path to: webapps (if you can modify location, see http://stackoverflow.com/questions/1012378/eclipse-server-locations-disabled-and-need-to-change-to-use-tomcat-installation)
3. change the run configuration, add below to vm args as Julien Deruère said:
-Dexo.conf.dir="C:\Users\Travail\ProgramFiles\GateIn-3.1.0-GA\gatein\conf" -Xms1024m -Xmx2048m -XX:MaxPermSize=768m -Dcom.sun.management.jmxremote -Dexo.product.developing=true -Dorg.exoplatform.container.configuration.debug -Djava.security.auth.login.config=C:\Users\Travail\ProgramFiles\GateIn-3.1.0-GA\conf\jaas.conf
4. re-launch server
5. register application and add portlet to your page in Gatein
6. debug portlet in Eclipse, cheers