title: How to configure Site URL and Canvas URL
body: <p>I'm trying to configure my application in facebook but I have a trouble.</p>
  
  <p>My application works through a servlet (http://www.mysite.com:port/myproject/servlet). In the settings of the application I'm setting:</p>
  
  <pre><code>Site URL: http://mysite:port/myproject/servlet?
  
  Canvas URL: http://mysite:port/myproject/servlet?
  </code></pre>
  
  <p>This configuration works properly except for one detail. If I access it by its URL "http://apps.facebook.com/myapp" or on my home page (column applications on the left side of the page the user) works correctly. But if new user accesses the application, after clicking the "allow" in permission dialog (https://developers.facebook.com/docs/beta/authentication), the application is redirected to a URL outside of facebook (http://mysite:port/myproject/servlet?) When it should be redirected to <a href="http://apps.facebook.com/myapp" rel="nofollow">http://apps.facebook.com/myapp</a>.</p>
  
  <p>What is the correct configuration?</p>
  
  <p>Thanks.</p>