--- title: Embedding UIs in Web Pages order: 2 layout: page --- [[advanced.embedding]] = Embedding UIs in Web Pages Many web sites are not all Vaadin, but Vaadin UIs are used only for specific functionalities. In practice, many web applications are a mixture of dynamic web pages, such as JSP, and Vaadin UIs embedded in such pages. Embedding Vaadin UIs in web pages is easy and there are several different ways to embed them. One is to have a [literal]#++
++# placeholder for the UI and load the Vaadin Client-Side Engine with some simple JavaScript code. Another method is even easier, which is to simply use the [literal]#++ ---- endif::web[] ifdef::web[] [[advanced.embedding.div.div]] === UI Placeholder Element A Vaadin UI is embedded in a placeholder [literal]#++
++# element. It should have the following features: * The [literal]#++
++# element must have an [literal]#++id++# attribute, which must be a unique ID in the page, normally something that identifies the servlet of the UI uniquely. * It must have at least the [literal]#++v-app++# style class. * it should have a nested [literal]#++
++# element with [literal]#++v-app-loading++# style class. This is a placeholder for the loading indicator that is displayed while the UI is being loaded. * It should also contain a [literal]#++