Get request parameters

I’m trying to access query parameters from UI.init(req) method.

While req.getParameter(name) works in standalone case, when Vaadin is embedded into div, the parameter map contains some vaadin-related entries.

What is the recommended way to read real query parameters, preferably one that works in both cases ?