Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Inserting Vaadin UIs in JSP and JSF Applications

DZone's Guide to

Inserting Vaadin UIs in JSP and JSF Applications

Integrating Vaadin to existing JSF and JSP-based (such as Struts, Stripes, or Turbine) applications just got easier. Read on and see how it's done!

Free Resource

Share, secure, distribute, control, and monetize your APIs with the platform built with performance, time-to-value, and growth in mind. Free 90-day trial of 3Scale by Red Hat

Integrating Vaadin to existing JSF and JSP-based (such as Struts, Stripes, or Turbine) applications just got easier. I recently published two add-ons to facilitate the integration of Vaadin UIs into JSP and JSF views. In short, the add-ons implement tags that you can directly use in JSP or XHTML files:

<vaadin:ui url="/myui"/>

The URL attribute tells the add-on where to find the VaadinServlet serving your Vaadin UI. It’s also possible to specify the theme and the widgetset to use:

<vaadin:ui url="/myui" widgetset="com.example.MyUiWidgetset" theme="mytheme"/>

Was it difficult to implement these add-ons? Yes, I had to do some extensive research about… Not! It wasn’t. Implementing this kind of integration is actually easy. And the technique is well-documented in the Vaadin documentation.

After a while developing web applications with Vaadin, you might get to the point where you are thinking mostly about Java classes, design patterns, reusability, refactoring, and Object Oriented concepts in general. This is due to the fact that Vaadin abstracts away complex web technologies that you have previously needed with JSF and JSP, so you no longer need to frequently think about these technologies. 

Having said that, understanding the very basics of how "the magic" happens is worth knowing, and if you are curious about how this kind of integration can be implemented, you can take a look at this example application or even better, watch this webinar.

I wrote "the magic" in the previous paragraph because in the end it’s just something carefully crafted by, in this case, a team of developers doing the hard work. So, let others do the hard work and use Vaadin for the rest.


IFrame

Explore the core elements of owning an API strategy and best practices for effective API programs. Download the API Owner's Manual, brought to you by 3Scale by Red Hat

Topics:
jsp ,jsf ,java ,struts2 ,stripes ,vaadin ,html

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}