uri parameter

Hi All,

I am not too familiar with vaadin 7 and I can not figure out this. I tried to use google but no useful result.

My question is very simple. How can I get the request url parameters in my UI class?

For example, my url is http://localhost:8080/myDemo/?code=AQAfKPsCvPLUM

The url parameter comes from facebook after user logged in (OAuth).

I tried to do these:

public class AdminUi extends UI
protected void init(VaadinRequest request)
System.out.println( request.getPathInfo());
System.out.println( request.getRemoteHost());
System.out.println( request.getParameterMap().size());
System.out.println( request.getAttribute(“code”) );
System.out.println( request.getParameter(“code”) );


request.getAttribute(“code”): null
request.getParameter(“code”): null

I realized that getParameterMap() has a “v-loc” parameter. But if I use it variable I have to write some code to get url parameter from this variable:

v-loc: http://localhost:80880/myDemo/?code=AQAfKPsCvPLUM…

theme: reindeer
v-rtzo: -600
v-dston: false

I think, it is not too nice solution.
Could you help me to find out the right way?

Thank you.

Is there any ideas?
How can I get request url parameters in vaadin7 UI class?

I really need your help.

Thank you.

Many people suggest use WrappedRequest object for get the original HttpServletRequest class.
But I can not see WrappedRequest class in the API.

Where is this class?

request.getParameter(“code”) should work. Try a simple sample application and verify.

Thank you for your answer.

Yes, this code should work. This wiki page describes everything very well:

I spent many hours to solve my problem and I realized what is my problem. But I can not solve it yet. I am using Embedding UI mode and I think this the problem.

If I do not use Embedding UI mode than request.getParameter(“code”) is working.

Please read this conversation:

Thank you.

If you know what is the wrong with my code, please do not hesitate tell me :slight_smile:

Solution: http://stackoverflow.com/questions/16493773/vaadin-7-url-parameter