HTML5 Front End for an Existing Java EE Application

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.


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

Posted by guest on January 18, 2013 at 06:08 PM PST #

it is good

Posted by guest on March 23, 2013 at 09:14 PM PDT #

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?

Posted by guest on January 12, 2014 at 12:01 AM PST #

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

Posted by guest on January 26, 2014 at 02:16 PM PST #

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

Posted by guest on August 16, 2014 at 05:49 PM PDT #

Why is it separated ?
Couldn't we have a single project for both ?

Posted by guest on February 11, 2016 at 08:39 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« July 2016