How to retrieve the parameters from a url in vaadin?

Im asking a question in vaadin in this forum is because of the reason that its a servlet based engine.Im developing a facebook app in vaadin .I am using OAuth2.0 authentication as its authetication protocol.I am stuck in a particular place.After providing in the credentials of the facebook account it gets redirected to a page which is of another website followed by a parameter called "code".The url is somewhat like this

www.xyz.com/?code=**********

What I want is to get the value of the parameter called code.Any would be greatly appreciated!...Forgive me if this is the wrong forum to ask this question.