Reputation: 4470
I am using vaadin 8 and have a html file, which I am showing it as :
StreamResource streamResource = createHTMLStreamResource();
BrowserWindowOpener opener = new BrowserWindowOpener(streamResource);
opener.setWindowName("PRISMA");
opener.setFeatures("location=0");
opener.extend(generateReportButton);
It opens a new window and shows the html content. that works great. But the address of it is http://localhost:8080/APP/connector/0/2373/url/PRISMAReport.html. Not sure from where "APP/connector/0/2373/url/" is coming from. But how I can remove it or set it up?
Upvotes: 0
Views: 56
Reputation: 8001
The URL is managed by the resource implementation. In the case of a StreamResource
, the URL will be a an internal URL that is handled by the Vaadin framework to serve bytes that are configured in createHTMLStreamResource()
.
If you want more control over the URL, then you need to also take control over how requests to that URL are handled e.g. by registering your own servlet to handle the requests. You can use the BrowserWindowOpener
constructor that takes a String
parameter if you want to define your own custom URL.
Upvotes: 1