I want to add a dashboard functionality to an existing java web application, this should be a portlet container, so it can host other mini applications or open social gadgets.
What is the best solution for this? Integrating an existing full blown portlet container?
Apache Pluto is an embeddable portlet server if you're looking for a simple engine to use existing portlets - it even has a JSP taglib you can use to embed in views.
You mentioned OpenSocial though (which I'd recommend over JSR-168, unless you have a particular portlet in mind) for which you could look at Apache Shindig, though that's still somewhat of a moving target.
Look at Liferay as a portal container:
http://www.liferay.com/products/liferay-portal
The open source version is free, and there's an enterprise edition (if you feel the need).
Infopark has a JSR-168 Portlet Container delivering portlets anywhere in normal content. They do content management, so the portlets are a way to create personal dynamic parts in static content. It works as a webapp in any servlet container like tomcat 5.5. Sorry, but it is commercial software.
Related
Hi i am completely new to portlets and portals. I have had a brief(very brief) look at the jsr for portlets, installed liferay played around with its default portlets and set myself up an eclipse working environment in the hope of developing my own little portlet module.
I have to create a portal similar to igoogle, and the tabs system in chrome I am not sure where to start with and I am reasonably comfortable with Java and have done some other J2EE apps, but dont really know how everything fits together in portal/portlet architecture (what files where etc) so any assistance you guys could lend would be greatly appreciated.
You will first need to decide which technologies to use for the portlet.
The portlet specification assume usage of vanilla JSP / Servlet. You can however use other frameworks such as JSF, Struts, Spring, etc. using the corresponding "glue". There are examples for the various technologies in the sample portlets.
For JSF, this glue is the JSR-301 Portlet Bridge for JSF, then you can use other JSF component suites.
I'm currently working on a portlet for Liferay based on JSF and RichFaces, and that seems to works more or less. No major glitches so far.
I don't know if the other component suites are well supported in Liferay portlet environment. Also, I don't think JSF 2.0 and Portlet spec 2.0 are mature enough. So we decided to stick to JSF 1.x and Portlet 1.0.
If you're committed to Liferay, the place to start is the Liferay SDK. They recently released a set of Eclipse plugins (Liferay IDE) which seem to automate much of the packaging for their toolkits (still ANT based - no good Maven resources that I'm aware of - current work has been proposed, but still seems broken/incomplete)
For some samples of portlets you can look at: https://lportal.svn.sourceforge.net/svnroot/lportal/plugins/trunk
I would warn you, Liferay portlets != JSR-168/286 - they have some extensions, and conventions beyond what's in the spec, and some of the platform's handlings default to different values than you might expect (e.g. preferences are shared across multiple users by default). Having said that, the same is true of most/all portlet containers.
I guess you have come across Liferay Portal Server as an open source free portal server to start experimenting with the portlet stuff.
As of working with portlets, the latest version of the portlets spec is JSR 286 (v2.0). As such, all the portlets which are created using Struts, Spring, JSF, basic portlets would follow this specification as the underlying principle. The new specification provides new features (public render parameters, events for inter-portlet communication) and new portlet lifecycles phases (resource, event) and other functionality than what was provided with portlets based on JSR 168.
However the following are to be observed for the relevant framework:
Struts does support JSR 168 portlets (v1.0) and not JSR 286 as of today. This is accomplished using the Struts portlet bridge.
JSF provides support for both JSR 168 and 286 and this is also accomplished using the JSF Portlet bridge (http://jcp.org/en/jsr/detail?id=301).
Spring portlet framework is based on the spring framework. They are pretty easy to work with. If in case, you have experience with Spring framework already then this one would be very easy to follow and start with. The latest version in Spring is v3.1. This support JSR 286 and backward compatible.
Most of the features that work are basically covered by the frameworks/bridges except for few which are Portal server configuration dependant. For the features that work based on the Portal Server( e.g. Liferay, WebSphere Portal, etc.) you would need to go the server documentation in order to see what needs to be declared in portlet.xml and other configuration files as would be mentioned by and for the server.
I would also recommend the book "Portlets In Action" by Ashish Sarin which explains things from the ground up.
All the best.
I'm building a webapp that uses jboss-seam with jsf, facelets and rich faces, running on top of jboss AS 5.1.
I would like to add a portlet area where I could add my own portlets, but from what I got (reading forums and documentation) I need to be running a portlet container/portal (something like liferay or gatein). But I don't want to be running a portal. I just want some kind of control where I can embed a portlet (something like an iFrame).
Is this true or I got it wrong?
If I'm wrong, how can I add an area to my webapp where I can add a portlet?
Thanks
Best regards.
If you are looking for a JSR 286 (Portlet 2) or JSR 168 (Portlet 1) compliant portlet, what you have read is correct. You need a portlet container. JBoss used to have JBoss Portal that should fit in your stack if you are focused on the JBoss products. In fact, you can find an entire bridge between JBoss Portal and the stack you are using. If you decide that you need a portal and want to look to other apps, I have successfully run Liferay on JBoss in the past.
At the same time, you can get something that looks and behaves like a portlet by using iframes or a div and JavaScript and back-end coding. With more specifics on what you want your pseudo-portlets to do, the community can more specifically help you figure out if wiring your own smaller framework within your existing code or attempting to have some sort of larger portlet container seems more reasonable. If you want to reproduce all of the Portlet 1 or 2 spec, I'd go with the container. If you want to reproduce a mini-iGoogle, you can probably do someting with JS and HTML.
EDIT: Looking through other questions with the same portlet tag, I found the jQuery UI Sortable - Portlets demo that might provide just the portlet-like features you are looking for without an entire Portal framework. It does, of course, pull in jQuery UI.
Frankly, if you're not going to go "whole hog" with portlets, or the portlet you wish to embed is particularly sophisticated, I don't think there is much value to switching over to a portlet container.
With JSF being a component framework, the difference between a "portlet" and a "JSF component" are really more ideological than actually technical (yes, the development model is different, but not dramatically). You likely be better off create a new, high level, JSF component to act as your portlet than bringing in the whole weight and complexity of a portlet container in to your app for a single service.
What are the different ways to create a web-application in Java? Are there tools available other than straight-up servlets?
Open source web frameworks in Java and related view technologies:
Tapestry
Apache Cocoon
Apache MyFaces
Spring MVC
Google Web Toolkit (GWT)
Java Server Faces (JSF)
Apache Struts
Turbine
Seam
Makumba
Java Server Pages (JSP)
Stripes
OpenXava
JPublish
wingS
Strecks
AribaWeb
Echo
RIFE
Anvil
WebOnSwing
Click
ThinWire
Facelets
Wicket
Check http://java-source.net/open-source/web-frameworks for more options and to read a brief overview of each one.
There are many many web frameworks for Java that allow you to build Web Applications. The vast majority are built on top of the Servlet API, but provide a layer of abstraction that you interact with instead of dealing with servlets directly
My favourite (for what its worth) is Wicket
An quite old and simple standard is CGI, and java can do that: http://www.apl.jhu.edu/~hall/java/CGI-with-Java.html
A more recommended today would be to use a web-framework. These usually abstract from the Servlet API and provide a ground for common patterns in web development.
Here is a quite long list of available choices: http://java-source.net/open-source/web-frameworks
In java there's also Facelets, JSF and many other frameworks, like Spring MVC.
JuanZe gives a good answer with the list of frameworks. Here's some more detail.
I'd say take a look at Struts, as it's one of the oldest and simplest frameworks. Struts v1 and v2 are two different beasts; Struts v1.0 was written mostly in a day, and you can learn it in an hour, and might be a very good introduction to web frameworks.
I currently use Spring, and wouldn't go back to Struts from there. The nice part of Spring is that it comes with the framework (Spring MVC), but there are dozens of other "nice to have" components that really help you out as you continue to learn 'em.
Other developers I work with complain regularly that Seam is the way to go. They've said some pretty intelligent things in the past, but I really like Spring, and our project is married to it.
Wicket also looks interesting; Spring is very heavy on XML, and Wicket gets rid of that, which is a very happy thought. That said, there's a pretty huge gain with some of the XML in Spring, so I'd worry about losing that.
As an addition, I'd take a look at Apache Commons, formerly called Jakarta Commons. It's a collection of useful libraries of stuff that probably should be included in the core Java API. Discursive has a wonderful book that walks you through it.
if you are asking about tools interface to develop a web application.i suggest eclipse coz its too convenient to use,flexible and can run on pcs with low configurations.i have just 512 mb ram and i m using it easily
As a quickstart you could download Netbeans http://netbeans.org/ , you can try almost all kinds of J2EE technologies with a preconfigured app-server and database using included sample projects. It tooks only seconds to build and run and if you like analyze the code.
and here there is another one, a very young one this time: (ยต)Micro. It is open source, Apache 2 license, and available on Github. I built this framework for fun and I was trying to port and simulate as much functionality as I could from my experience as a Sinatra/Rails developer. Cheers!
I'm looking into implementing one of our internal applications as a portal using portlets, as it has many functionalities and not all of them are required by all users.
I've looking at the Apache protals site and I saw that there are two projects - Jetspeed 2 and Pluto.
Although Jetspeed is described as portal and Pluto as a portlet container, it also provides a portal of its own. What is the real difference between them and their functionalities? Can you recommend which should I start "playing" with?
Jetspeed 2 uses Pluto as its portlet container, but it is geared towards being a fully functional enterprise application, including its own suite of portlets, SSO, customizable security, themes etc....
If you are looking to get started with portals/portlets, the Jetspeed 2 project is moving along rapidly, and I would suggest joining the mailing lists, as they can be incredibly helpful. Also, download and build the portal from source using the tutorial on the apache portals site and you should be up and running with a custom portal in no time.
I have worked extensively with Jetspeed 1. I have been a bit out of the loop since J2 and JSR 186, but here is my best guess. It is only a guess, but I'm confident enough to post it here.
(Assumption: a portal uses a portlet container, and a portlet container cannot really run by itself.)
Jetspeed 2 aims to be a full enterprise portal which uses Pluto as the portlet container. Pluto has its own simple portal, as it does not want a dependency on any given portal project. I believe the Pluto portal is not intended as enterprise-level.
The statement above is supported by this part of the Pluto FAQ (from here):
Is Pluto an Enterprise Portal?
No, the Pluto project aims to provide a Java Specification compliant
Portlet Container. In order to support
the container, the Pluto project
provides a simple portal, however,
this does not provides optional
services such as single sign on. If
you are looking for an Open Source
enterprise Portal implementation,
there are several available. Apache
Jetspeed is an enterprise portal
hosted by the Apache Software
Foundation. Sakai and uPortal are both
educational portals which utilize
Pluto as their container. There are
many other open source portals.
Pluto is really not intended to be use as Enterprise Portal. It's useful for development(it's tiny&fast) and you can embed it if you want to develop you own Portal server. But that's a lot of work.
If you want to just "dive in" look at JetSpeed. Or I can recommend you to have a look at Liferay Portal. It's open source as well and it's going with a lot of plugins(portlets) right out-of-the-box. So it gives you a quick impression what is possible to do with it.
Do you know a technology which can provide me a portlet-like interface?
But I do not want to use JSR 168/268 portlet specifications and a portlet container.
The reason is: My web app is a product which can be installed on the client's server (it can be weblogic/websphere/tomcat).
Packing the portlets container along with my application to be installed on clients web server is just too much.
Besides, there are a lot of features this technology offers which I don't need. Actually, all I need is the porlets look and feel (dragable and customizable windows,adding and removing windows and so on).
I know there is also the possibility to do it with client technology (like jquery) and that is cool, but I would like to know if there is any kind of java technology out there which will also give me that.
So, if you know something like a struts or a spring-mvc component library which does this job or maybe a third party product, I would like to know.
If you think my whole approach is wrong I would also like to know that.
Take a look at gwtportlets. From their site;
GWT Portlets is a free open source web
framework for building GWT (Google Web
Toolkit) applications. It defines a
very simple & productive, yet powerful
programming model to build good
looking, modular GWT applications.
The programming model is somewhat
similar to writing JSR168 portlets for
a portal server (Liferay, JBoss Portal
etc.). The "portal" is your
application built using the GWT
Portlets framework as a library.
Application functionality is developed
as loosely coupled Portlets each with
an optional server side DataProvider.
Take a look at the demo here
Another suggestion would be JSF 2.0 which provide AJAX support for updating part of the HTML-page out of the box.
Have a look at this series to get an idea of the possibilities:
http://www.ibm.com/developerworks/java/library/j-jsf2fu1/index.html