0

I have a webapp running on a payara server which is behind an nginx server, the webapp is working fine, same for the css/img/js files. My problem is that this line #{request.requestURL} in a facelet returns the local url (http://localhost:port) instead of the actual url of the website.

Do you have any idea of how I could fix this ?

Thank you in advance.

FYI: nginx 1.12.1, Payara 5.183, java-ee 8, jsf 2.3

Kukeltje
  • 12,223
  • 4
  • 24
  • 47
Pilpin
  • 150
  • 9
  • So this works if you use a very simple servlet? Or when you use tomcat instead of payara? JSF just takes what the servlet engine throws at it. So JSF cannot do anything about this. – Kukeltje Nov 06 '18 at 19:50
  • I haven't tried configuring a simple servlet or using tomcat instead, I reckoned the issue is between nginx and payara but I don't know which one to configure differently. – Pilpin Nov 06 '18 at 23:13
  • If you try with a simple servlet, you could exclude jsf being related. A simple servlet could run in tomcat as well and if the same does not happens there, you know it is payara relatede. If the same does happen there you know that either it is a generic issue in servlet containers (something you use wrongly) or it is a payara issue. Also read https://stackoverflow.com/questions/19598690/how-to-get-host-name-with-port-from-a-http-or-https-request – Kukeltje Nov 06 '18 at 23:55

0 Answers0