Wednesday, July 16, 2008

JSF: put an object in the request map

You can put everything into the request scope througt the ExternalContext
ExternalContext ctx = FacesContext.getCurrentInstance().getExternalContext();
Map map =ctx.getRequestMap();
map.put("person", new Person("John", "Smith"));

then can you show the data in the jsp page with the EL syntax as usual:
<h:outputText value="#{person.name}" />

Sunday, July 6, 2008

Installing Eclipse Plugins in a separate path

It may be very practical to install Eclipse extensions anywhere on your hard disk and not necessarily in the Eclipse installation folder.
To do this, create a folder named for example eclipse-addons.
Put there in other folders your plug-ins and create inside every plug-in folder a directory named eclipse. For example:
~/eclipse-addons/myplugin/eclipse

Assure that Eclipse is closes and then go to your Eclipse directory and create a folder named links.
Create there a file with the extension .link for each of your plug-ins and write in this file just the following line:
path=~/eclipse-addons/myplugin

You've done, now can you start eclipse and the plug-ins are installed.