Geertjan's Blog

  • October 16, 2012

HTML5 Front End for an Existing Java EE Application

Geertjan Wielenga
Product Manager

Go here to see a complete HTML5 front end for the  NetBeans E-commerce Tutorial, which creates the Affable Bean Project:


The process of creating the HTML5 implementation of the project is described by David Konecny in this JavaOne session (there's a link to a screencast and a downloadable MP4 in the link below):


The high level steps described in the session are as follows:

server-side work:

  • add REST services
  • configure JSON providers
  • enable CORS (cross origin resource sharing)

client-side work:

  • pick an MVC framework (JavaScript one)
  • write code which talks to REST services
  • write the app UI using HTML5 and your MVC framework
  • write unit tests for the app
  • package the app inside the original Java Web app 

Here's two screenshots, one showing the server side, the other the client side, downloadable from the link with which this blog entry started.

Join the discussion

Comments ( 6 )
  • guest Saturday, January 19, 2013

    Please tell me why they use the jsp files in the server side it should user in client side with the html fils.


  • guest Sunday, March 24, 2013

    it is good

  • guest Sunday, January 12, 2014

    Hi Geertjan,

    Very nice post. I was wondering... why Java is not in a position where it is using HTML, CSS or Javascript for its GUI? Java Swing has lots of limitations for UI designers and also it is tedious. Frankly... it is old! Where using HTML bootstrap, CSS all of the UI requirements are already taken care of.

    I know that JavaFX introduced the web browser in Java and sadly attempted to introduce a fxml style GUI but it is bit clunky. Bit unncessary to learn something new with not much gain!

    Why not develop a solution where the Front-end of a desktop java application will use HTML5 and the backend will use good old Java for carrying out bulk of the work.

    Java already has a great reputation... why not combine it with the best of HTML, CSS and Javascript for desktop applications?

  • guest Sunday, January 26, 2014

    Nice and clean, but what about security? The enterprise folks dont like to expose unencrypted data across the wire

  • guest Sunday, August 17, 2014

    To above; this system, when mixed with jquery and jsf, completely trumps ASP.Net MVC/WebApi and really supports a new framework using Beans/JPA_implementation/JAXRS on server side, and blending JSF with html5 on client side, for some pages using rapid forms and other pages utilizing content control. USing JSON with constraint systems and SessionScoped beans allows for security, and managed control over content juggling after post

  • guest Thursday, February 11, 2016

    Why is it separated ?

    Couldn't we have a single project for both ?

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.