The train starts running, NetBeans Innovators Grants has just announced.

The train start running, NetBeans Innovators Grants has just announced.

  • Are you an RCP developer looking for some financial support to implenent some modules on top of NetBeans RCP?
  • Are you familiar with NetBeans IDE and also you have some ideas in your sleeve, ideas to enhance the IDE functionalitis, ideas about new functionalities, etc?
  • Do you know some bugs/ RFEs in issuzilla which you can fix them, but you were looking for financial support?
  • Do you have some cool ideas about some sample projects or blueprints showing How one can develop Java/ J2EE/ J2ME/ Ruby/ C++ projects using NetBeans IDE and its capabilities?

If you fit into one of the above categories, you can join the NetBeans Innovators Grants, a sub program of SUN Microsystems US$ 1 million Program which is intended to help people develop open source projects sponsored by SUN Microsystems.

Take a look at NetBeans Innovators Grants Home Page, read it carefully, check SubMission Details page to gain some understanding of what is expected in your submission, and after you prepared your project proposal you can come to Proposal Submission page and file in the forms with your project details in order to jump into the contest train.

Another item which could be the subject of a project is contributing articles, tutorials and sample codes to NetBeans Zone located at Netbeans Zone, this web site. it is intended to be the most complete source of articles, links,…. for NetBeans platform and IDE.

P.S: Make sure that you read the legal page located at: Legal information

SHIFT+ALT+ENTER, a cool NetBeans shortcut

Today accidentally I find a coll shortcut in NetBeans, it do something fun, if you press ALT+SHIFT+ENTER IDE switch to full screen, it will remove Title bar, status bar, and toolbar to give you a little more space when you are writing your code.

Here is an image of netbeans in this mode, you will find it usefull.


Also If you are looking for some NetBeans sample you can take a look at NetBeans IDE Sample Applications which is a good start point for you to find some ready to run samples for different platform from java SE to RoR which is fully supported in NetBeans 6.

NetBeans 6 M7 released. There are some cool features available and cool modules in UC.

NetBeans 6 milestone 7  has released and you can download it from NetBeans web site by at least two methods

  • Traditional setup file for separate packs
  • using new NetBeans installer which allows you to customize your package before you download it.

Traditional method for downloading NetBeans 6 which is a development build is using and the new installer which I am going to talk about is available at .
Google pack installer is somehow similar to new NetBeans installer. In one simple paragraph it allows you to customize what you need in one mega installer and then you can download your customized package to your local machine to install those components into your system.
features that new installer has and I really like them are as follow (sure you may find some there feature that I have not mentioned )

  • Download what you need by customizing the download package.

Download section.

  • From bundle that you have download you may not install all of them at the same time.

Installer first round

When you choose to install glassfish you have option to select its path, ports, and default JDK which are important options.

  • You are allowed to uninstall some of components when you do not need them by running the installer again.


  • Installer register any component that you install into other components (Application server, mobility features,….).
  • Tight integration with windows add or remove programs.
  • And many other features that I do not noticed yet.

But there are some other cool changes in NetBeans IDE, look what we have as our icon set, it remind me some of Firefox themes with fantasy icons. I hope we could see some modularity mechanism for icons which will allows NetBeans fans to develop some new icon set or use older version of icon set.
new icons

Based on NetBeans 6 Feature Plan  we will have RoR and JavaScript support in NetBeans 6 M7, so this features should be inside our downloaded IDE or in update center, lets look and see what does we have in NetBeans new project and file and also in update centers.
Yes, we have JavaScript and ROR support built-in.

Lets see what else we can find in update center that is not available for 5.5.* or in NetBeans 6 M7 out of the box.


As you can see RoR support is available in update center. 
If you are one of those RoR fans you should be happy now.


Ok, there are tens of new language support based on new common scripting language support.
Support for this languages is in several levels, from syntax highlight to code completion.
you can try one that you need and if you find it useful you can vote for this future. NetBeans development team will value community inputs.

Maven support

There are some other good module which i have selected to be installed. As you can see Maven support is there too.


OK, what that really amazed me about new modules for NetBeans IDE is Jasper Report Visual designer, Its really cool to see a report designer for jasper report integrated into NetBeans.

I know that it has some basic integration but it is the initial release of this really cool module. here are some images of Jasper report designer integrated into NetBeans.


the project home page is credits goes to developer of this really required module.

NetBeans 6 release is as amazing as NetBeans 5 release was.

Jonas Joins to Netbeans supported application servers

Jonas Joins to Netbeans supported Application servers
By release of first public version of JOnbAS List of netbeans supported application servers growth to

  1. Sun java application server (Glassfish)
  2. JBoss application server
  3. Tomcat servlet container
  4. WebLogic application server
  5. JonAs application server

and im sure this is a growing list.
by my experiences , Netbeans has very good support for application server.
specially its support for Glassfish (Sun microsystem itself application server) outstanding.
with the current module you can :

  • Starting and stopping the server
  • Java and JSP debugging
  • Generating the default server specific deployment descriptors
  • Deploying, undeploying the Web, EJB and EAR modules
  • Browsing the deployed WAR, EJB and EAR modules

which is almost enough.

I think sooner or later we will see good support for Geronimo , Resin and Jetty as contributed or independed modules, and it is that time which Netbeans application server support has no reason not be the best.

Netbeans 5.5 and Jdeveloper both sounds very good…

Netbeans 5.5 and Jdeveloper which one ?
Both Jdeveloper and Netbeans that i am talking about them are in beta and developer preview stage.
Netbeans as an Opensource IDE has its own fast growing user community.

Netbeans 5.5 beta 2 let features include :

  • develop and deploy on tomcat / Glassfish and Jboss out of the box.
  • As core features it has many code generation facilitis which can help to bootstrap an application ,it has code generation for CMPs , session facades ,ws client stub….
  • Having an almost first class profiler , first class J2me development pack
  • New c/c++ development pack
  • good support for SVN and CVS
  • very good Swing designer
  • developer collaboration module
  • Heavy support of SUN by giving the source codes for some of its extra pack

which Made NetBeans a good choice for developers.

One of the packs that donated by sun· is Enterprise pack , Enterprise pack features in brief are as follow :

  • UML 2 compliant modeler
  • visual BPEL
  • visual WSDL designer
  • xml visual tools for xml schema declaration …
  • facilities to develop web service and apply security on them.

Sun announced that it will add Java Studio creator to NetBeans Stack as another package.
having Creator can attract many users to Netbeans as it provide a rich set of feature for web application developers.

but what about Oracle JDeveloper
some times ago Oracle announced that it will let developers to use JBeveloper for free . so Jdeveloper and Netbeans from one point of view are the same ,You will not pay any penny for them.
Oracle really boosts JDeveloper in recent years which made JDeveloper a choice for j2ee application developers
JDeveloper Editor has changed to a very powerful editor with a good refactoring support.
opposite to Netbeans which you need to download several package to gain most of its feature you will not need to download any extra package to make use of jdeveloper as it is appropriated.

  • Oracle have much more code generation falsities that Netbeans .
  • visual ESB modeling allows you to assemble you ESB component visually (its ESB is not JBI compliant)
  • visual WSDL designer
  • visual xml development tools
  • good swing designer and data binding using oracle ADF
  • good JSF / Struts support , indeed Jdeveloper JSF support with its ADF faces is brilliant.
  • WYSIWYG for HTML and jsp pages with support of third party jsf libraries like Myfaces.
  • first class database development facilities ( for oracle database mostly).
  • Only you can use oracle server suite as development server there is no support for other application servers.
  • No support for c/c++ development (AFAIK).
  • built-in profiler
  • very powerful web page generation which can bootstrap a data driven web page design.
  • UML modeler (1.4 compliant)
  • very rich set of facilities for Web service development

I think JDeveloper (for now) is ahead of NetBeans as it provide much more facilities for developers , but for later version we can not tell anything because NetBeans people are unpredictable , as they prove their credibility by release of NetBeans 5.

What you have read is my opinion which might be biased. we never can say that one IDE is 100% better than another , it is just context oriented and the users view point. but one thing is completely obvious that JDeveloper and NetBeans both are going to provide rich facilities for SOA. NetBeans by means of· Enterprise pack and using glassfish with integrated BPMS from intalio and· what it has acquired from seebyond.
and oracle with its SOA suite and JDeveloper , both are going to make choice harder for developers.

Develop web application with netbeans ,seam and Glassfish

In this two part series I will try to show you how easily you can  build applications using NetBeans 5.5 based on  seam , facelets , jsf and new EJB 3 standard.

I will not discuss any of framework in details as you can find detailed information about each of them in their homepage and some other articles.
I want just show , How you can use NetBeans with some leading frameworks to build your web based applications. I will not discuss NetBeans specific tasks in details .
I will more focus on leveraging this stuff together using NetBeans IDE.

What you will need to follow  this series :

  • NetBeans enterprise edition 5.5 , you will need Glassfish or JBoss to continue with this series. check and make sure that your NetBeans has application server bundled otherwise get a copy of glassfish from its website.
  • seam 1.0.1 GA  or newer.

seam distribution contain Facelets too , but i strongly suggest you get Facelets distribution separately and take a look at its samples and very good documentation. indeed both Facelets and seam has very good documentation.

In this entry I will introduce each of this frameworks in very brief  to make the series stand alone , and i will show you how to setup the development environment and we will go with first part which is developing seam layer codes.

JBoss seam is created to leverage maximum possible feature of Java EE 5 standards like JSF and EJB3.
seam , seamlessly integrate EJB3 as a backend with JSF as presentation , meanwhile provide management of long running process
by using JBPM . and give you ability to focus on your business logic rather than silly data providing stuff. By leveraging Facelets helps you to do even more with seam and JSF.

To name its features I can say:

  • Lesser XML, More Annotation. (please do not blame me for naming annotation and XML in one line :-))
  • it let you go with your business logic rather thinking and resolving some common issue like user conversation state.
  • seam has a more flexible context model , it has 8 context , by means of this context you can manage your application more effective. for example a business process live in business process context .
  • Accessing each component in entire seam context with one unique name.
  • Managing workplaces and conversations .
  • It easily will let you develop Portlet by providing a Portlet context . we will discuss this item in latter parts

With many more features.

But about JSF , JSF is  a web framework , it is  Standard and  Developed under JSR 127.
Some of JSF features are as follow:

  •  User interface framework
  •  Server-side UI components
  •  Event model , something like desktop applications event model , but very reduced.
  •  Component state
  •  Renderers , Render Kits , for example ADF faces has a telnet render which make it possible to render a ADF faces application for a  telnet client.
  •  Validation
  •  Type conversion
  •  Internationalization

about Facelets , we will discuss more in next articles , but for now you should know that Facelets bring some view related enhancement and features to JSF community .
To name some of features :

  • Facelets make it possible to develop your entire web pages using your favorite page designer like Dream weaver or Microsoft FrontPage. to achieve this feature it introduce a new attribute, jsfc ,that make it possible to change each html element  to a JSF equal component. it is similar to Tapestry ‘s jwcid attribute. So you can use all binding and event handling stuff of JSF and availability and ease of use of html WYSIWYG.
  • Facelets provide a template-ing  features like Velocity’s for JSF . it allows you to test JSF views out of container.
  • Some decoration features like what tile bring to struts community and SiteMesh ,generally, to all java based web application.

lets start the job of creating simplest sample 😉 .

I assume that you download seam and extract it in seam_home Also your NetBeans 5.5 is running and an application server capable of  containing ejb3 (Glassfish) is configured with your IDE.

for sake of simplicity we make one   Library in our NetBeans IDE to make our job easier. as you know each library could contain some jar files, etc…

Create a library name it seam and add the following jar files to it , the first

add seam library  to Registeration-EJBModule and Registeration-WebModule

Switch to runtime view (CTRL+5).Extend database node  , if you have no database created in your embedded derby  then create a database and create a table with following  characteristics
Table Name: users
Fields :


varcahr(255) , primary key


varchar(255) , not null


varcahr(255) , not null

after you create this table , create a new enterprise application project by going to , file>new project>enterprise application
name it Registeration. make sure that you have selected the Java EE 5 as j2ee version.

go to project view (CTRL+1) And select Registeration-ejbModule , right click on it and select CMP entity bean from database…
Now you should be able to select the JDBC connection that you have made in above step and give it a package name.
click next and select users table from left column and add it to right column.
click finish.
That’s it , you have your CMP ready to go.

  • what we need to add to the CMP bean class in addition to its created structure
  • another constructor with all the CMP  fields.
  • some annotation for getters , to help us in validation

final shape of users CMP will be like :


package cmps;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.validator.Length;
import org.hibernate.validator.NotNull;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
 * @author Masoud Kalali
public class Users implements Serializable{
   private static final long serialVersionUID = 1881413500711441951L;
    private String username;

    private String password;

    private String name;

    /** Creates a new instance of Users */
    public Users() {

    public  Users(String name, String password, String username)
 { = name;
this.password = password;
this.username = username;

    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "username", nullable = false)
     @Length(min=5, max=15)
    public String getUsername() {
        return this.username;

    public void setUsername(String username) {
        this.username = username;

    @Column(name = "password", nullable = false)
     @Length(min=5, max=15)
    public String getPassword() {
        return this.password;

    public void setPassword(String password) {
        this.password = password;

    @Column(name = "name", nullable = false)
     @Length(min=5, max=15)
    public String getName() {

    public void setName(String name) { = name;



we are finished with our POJO EJB 🙂 , now lets go and handle web layer stuff , from now we are working with seam view layer and JSF , I will talk about Facelets later in other articles of this series.

as I said in sample scenario we have just one action , so we can use a  managed bean or plain java object or whatever that is useable here as action listener or use a stateless session bean (using session bean is what JBoss offer) so we will use a stateless session bean to implement our action listener , it will also helps you to see how an stateless session bean is implemented in java EE 5.
so create a session bean by using , file > new > session bean , now you can select session bean type to be stateless , and change the package name to be sbeans
click finish  , editor will open up and show you the stateless seasion bean class.   
change the class body , in a way that final class looks like :

import cmps.Users;
import java.util.List;

import javax.ejb.Stateless;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import org.hibernate.validator.Valid;
import org.jboss.seam.annotations.Factory;

import org.jboss.seam.annotations.IfInvalid;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Outcome;
import org.jboss.seam.annotations.datamodel.DataModel;
import org.jboss.seam.core.FacesMessages;
import org.jboss.seam.ejb.SeamInterceptor;

public class ActionBean implements sbeans.ActionLocal

   public String ()
      List existing = em.createQuery("select username from User where username=:username")
         .setParameter("username", user.getUsername())
      if (existing.size()==0)
         return "success";
         FacesMessages.instance().add("User #{user.username} already exists");
         return "success";


we will need to add same method signature to our session bean local interface , so add the method signature to ActionLocal class. it will looks like :

package sbeans;

 * This is the business interface for Action enterprise bean.
public interface ActionLocal {
      public String ();

now we are finished with the action , you may ask what are those annotation stuff in the session bean , so I should ask you to take a look at seam reference or wait until next part of this series. I should say that it is a very same version of seam sample that is implemented again in NetBeans IDE.
we are finished with EJBModule for now , lets take a look at what we will have in web module. first of all you need to add JSF framework to web module to do this , right click on web module and select properties , go to frameworks node and add JSF framework to the project. In web module we just have 2 JSF pages , one to , one to show the that s/he ed . Create following JSF files ,


same as seam sample register.jsp , used for registering purpose


same as seam sample registered.jsp , used for showing the user that he/she is ed

we need to add some navigation case to our faces-config.xml , so extend web module note and under configuration files open the faces-config.xml we should add 4 navigation case to it , so right click inside the editor ,which show content of faces-config.xml, and select add navigation rule. a dialog will open , just fill the dialog as following table show

Rule From View


Now right click in the editor and add 4 new navigation case , these cases will handle navigating from one view to another.

From View

From Outcome

To view




lets code with the register.jsp , open the register.jsp in your NetBeans editor change the content to :

<%@ taglib uri="" prefix="h" %>
<%@ taglib uri="" prefix="f" %>
<%@ taglib prefix="s" uri=""%>
<title> New User</title>
<table border="0">
<td><h:inputText id="username" value="#{user.username}" required="true" /></td>
<td>      <h:message for="username"/>       </td>
<td>Real Name</td>
<td><h:inputText  id="name" value="#{}" required="true" /></td>
<td>      <h:message for="name"/>       </td>
<td><h:inputSecret id="password" value="#{user.password}"  required="true" /></td>
<td>      <h:message for="password"/>       </td>
<h:messages globalOnly="true"/>
<h:commandButton type="submit" value="" action="#{.}"/>

No we need to create the registered.jsp which show that our user is registered. open the file in your editor and change its content to looks like :

<%@ taglib uri="" prefix="h" %>
<%@ taglib uri="" prefix="f" %>
<title>Successfully ed New User</title>
Welcome, <h:outputText value="#{}"/>,
you are successfully ed as <h:outputText value="#{user.username}"/>.

Now we are almost finished with JSf files , there are some changes that we should make in web.xml and faces-config.xml.first open web.xml and add the following lines to it.make sure the you add them directly inside <web-app> node.



<	ejb-link>RegisterActionBean</ejb-link>

Now open faces-config.xml and add the following lines to it.

<lifecycle> <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener> </lifecycle>

That’s it , you are finished creating your first seam sample in netbeans , lets execute the application and see the result. press f6 and wait until your browser opens , navigate to http://localhost:8080/Registration-WebModule/faces/register.jsp enter some information and then press register button.

You can check whether it applied or not by switching to runtime view and checking your Users table data . you can find complete explanation of jsp/java codes in Seam tutorial chapter 1 at :