title: Amazon web services AWS: how to host java app, assign custom domain, custom domain name doesn't work properly
body: <p>I have a site hosted here: <a href="http://testapp-test.us-west-2.elasticbeanstalk.com/someservlet.do" rel="nofollow noreferrer">http://testapp-test.us-west-2.elasticbeanstalk.com/someservlet.do</a></p>
  
  <p>The site contains an <code>index.jsp</code> and a <code>someservlet</code>.</p>
  
  <p>In <a href="https://my.freenom.com" rel="nofollow noreferrer">https://my.freenom.com</a> cabinet I tried: to set nameservers and to set url forwarding to <a href="http://testapp-test.us-west-2.elasticbeanstalk.com" rel="nofollow noreferrer">http://testapp-test.us-west-2.elasticbeanstalk.com</a>. 
  The former doesn't work: I set the nameservers as the screen shows and when trying to access codingrecords.tk it is just blank. 
  URL forwarding however works, and it does display the main page, but when I try to access <a href="http://codingrecords.tk/someservlet.do" rel="nofollow noreferrer">http://codingrecords.tk/someservlet.do</a> it still displays the <code>index.jsp</code> message.</p>
  
  <p>How do I fix it? By specifying nameservers, rather than url forwarding? But then it doesn't work too..</p>
  
  <p><a href="https://i.stack.imgur.com/KtYiy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KtYiy.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/E3CAc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E3CAc.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/Xu9jd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Xu9jd.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/mJWcr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mJWcr.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/Z9I2Q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Z9I2Q.png" alt="enter image description here"></a></p>