Posted on 2008-08-21 15:20:00.0 by noreply@blogger.com (Thomas Heute)
[ View original post ]
JBoss Tools 3.0.0 Alpha1 has been released with initial support for portlets (including JSF and Seam portlets).
Two warning, first it is Alpha with all it means. Second one, the blog entry looks long and complicated. In fact i included many screenshots so that people who don't want to try can have a good overview of how it works. It's very simple for anyone a bit familiar with Eclipse.
First we need Eclipse Ganymede, JBoss Tools 3.0.0 Alpha1 and a version of JBoss Portal (bundle if you are looking for simplicity, and 2.7 if you want a Portlet 2.0).
Extract Eclipse and JBoss Tools, you should get a unique "eclipse" directory.
Extract JBoss Portal
$ tar zxvf ~/Download/eclipse-jee-ganymede-linux-gtk.tar.gz$ unzip ~/Download/JBossTools-3.0.0.Alpha1-ALL-linux-gtk.zip$ unzip ~/Download/jboss-portal-2.7.0.B1-bundled.zipNow you should have an "eclipse" directory. Let's go in it and start Eclipse.
Once started go to the workbench and do
File>New>Dynamic Web Project.You can fill-in the name for your project.
And create a new "Target Runtime" such as on the following screenshot:

And point it to the location of your JBoss AS + Portal installation:

Now don't forget to set a Portlet Project configuration (Portlet 1.0 or 2.0)

And click on
Finish.
Our base project is done, now let's add a portet into it.
Choose File>New>Other (or Ctrl+N) then select one of the
JBoss Web Tools>Portlet wizard.

We'll pick
Java Portlet for this blog. Fill in the Java Package and the class name and click Next.

On this other screen you will be able to set the display name of the portlet, a title, a description, the supported modes and init parameters.

On the next screen you can define which methods you want to override from GenericPortlet.

The last screen let you build JBoss Portal specific descriptors to create an instance during the deployment and place it directly on the portal.
Now that it is done, all the requires files are part of the Eclipse explorer and are ready to be built and deployed.

Now right click on the project and do
Run As>Run On Server and accept the default. It will deploy the portlet web application and start JBoss AS.
(Little glitch, once started it will open the browser on http://localhost:8080/foobar, use http://localhost:8080/portal and you will see your portlet:

And voila ! From here you have access to all the other features of JBoss Tools.
Thanks Snjezana for the hard work !
Post to DZone
Post to del.icio.us
Digg this!
Stumble It!