World Library  
Flag as Inappropriate
Email this Article

JWt (Java web toolkit)

Article Id: WHEBN0039020977
Reproduction Date:

Title: JWt (Java web toolkit)  
Author: World Heritage Encyclopedia
Language: English
Subject: Wt (web toolkit), Ajax (programming)
Collection: Ajax (Programming), Rich Internet Application Frameworks, Web Application Frameworks, Web Development Software
Publisher: World Heritage Encyclopedia

JWt (Java web toolkit)

Original author(s) Emweb
Initial release 1.0.0 / Released December 2005
Stable release 3.3.4 / March 25, 2015 (2015-03-25)[1]
Written in Java
Operating system Any
Type Web application framework
License Dual License: GNU General Public License or Commercial License
Website /

JWt (pronounced "jay-witty") is an open source widget-centric web application framework for the Java programming language developed by Emweb. It has an API that uses established GUI application development patterns. The programming model is component-based and event-driven, similar to Swing.

The goal of the library is to benefit from the stateful component model used in desktop applications APIs, applied to web development, instead of the traditional model–view–controller (MVC) model. Rather than using MVC at the level of a page, MVC is pushed to the level of individual components.

While the library uses a desktop application development model, it does support web-specific features including semantic URLs, browser history navigation support, internationalization, themes and styling, ...

A unique feature of the library is its abstraction layer of the browser rendering model. The library uses Ajax for communicating with Ajax-capable browsers, while using plain HTML form post-backs for other user agents (for accessibility and search engines). Using a progressive bootstrap method, the user interface is initially rendered as plain HTML, and for Ajax-capable browsers, it is automatically upgraded to use Ajax for increased interactivity. In this way, it is the only server-side framework that implements progressive enhancement automatically, and the only Ajax framework with search engine optimization (SEO) qualities.

JWt is distributed as a jar file. A JWt application is a war file that is deployed in a standards-compliant servlet container.


  • Major features 1
  • Code example 2
  • See also 3
  • References 4
  • External links 5

Major features

See the feature list on the project homepage for a more detailed overview.

  • Automatic graceful degradation and progressive enhancement
  • On all modern browsers, a JWt application is a Single Page Application, with full support for forward/back and bookmark navigation, but still fully SEO.
  • Supports server-initiated events (Comet), and uses Asynchronous I/O when deployed within a Servlet 3.0 container.
  • A unified 2D rendering API (SVG/HTML5 canvas/VML/PDF) with java.awt.Graphics2D compatibility
  • Integrated PDF rendering for Widgets, Graphics (Charts) and HTML/CSS, to generate reports
  • Both client-side and server-side validation
  • Various automatic built-in security features to avoid Cross-site scripting and CSRF vulnerabilities.
  • Theme support through CSS or Twitter Bootstrap
  • Available widgets are demonstrated in the widget gallery
  • A 3D painting API for WebGL rendering, with fallback to server-side GPU accelerated rendering
  • A 3D chart API (surfaces, points, bar charts, ...) supporting selection, intersection highlighting, height maps, isolines, ...

Code example

The Hello World! example full source code

 * A simple hello world application class which demonstrates how to react
 * to events, read input, and give feed-back.
public class HelloApplication extends WApplication {
    public HelloApplication(WEnvironment env) {
        setTitle("Hello world");

        getRoot().addWidget(new WText("Your name, please ? "));
        final WLineEdit nameEdit = new WLineEdit(getRoot());

        WPushButton button = new WPushButton("Greet me.", getRoot());
        button.setMargin(5, Side.Left);

        getRoot().addWidget(new WBreak());

        final WText greeting = new WText(getRoot());

        button.clicked().addListener(this, new Signal.Listener() {
            public void trigger() {
                greeting.setText("Hello there, " + nameEdit.getText());

See also


  1. ^
  • Article in Dr Dobb's Journal, Feb 2008
  • Introductory article at CodeGuru, Jun 2008

External links

  • JWt Project Homepage
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.