How to get Data From Vaadin to HTML/Jsp File?

530 Views Asked by At

I have created a HTML page that is called from Vaadin.

I have written the following code to call HTML page from Vaadin.

ExternalResource resource = new ExternalResource("VAADIN/map.jsp");
Embedded browser= new Embedded("",resource);
browser.setType(Embedded.TYPE_BROWSER);
browser.setSizeFull();     

browser.setData("Test Data");

This code successfully redirect to map.jsp file, but i am unable to send the data with it.. I have added browser.setData("Test Data");, but i am unable to understand how to get this data in jsp file.

Kindly guide me how to do this.

Thanks

2

There are 2 best solutions below

0
On

With Vaadin 7 you can do something like this:

ExternalResource jsp = new ExternalResource("page.jsp?param=ok");
BrowserFrame frame = new BrowserFrame("JSP:", jsp);
layout.addComponent(frame);

You can test it with the following page.jsp file:

<html>
    <body>
        param = <%= request.getParameter("param") %>
    </body>
</html>
1
On

Try to pass the data as url parameters:

VAADIN/map.jsp?param1=Value1&param2=value2