2

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

ParkerHalo
  • 4,341
  • 9
  • 29
  • 51
dev90
  • 7,187
  • 15
  • 80
  • 153

2 Answers2

1

Try to pass the data as url parameters:

VAADIN/map.jsp?param1=Value1&param2=value2
Nebras
  • 636
  • 1
  • 7
  • 16
1

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>
Alejandro Duarte
  • 1,365
  • 8
  • 15