so I have a bit of a problem with how urls are generated inside my web app.
I have my 'demo' springboot app deployed on my server as 'demo.war' (which expodes to a 'demo' folder). I also have an apache subdomain configured to map demo.myserver.com to the correct context on tomcat:
<VirtualHost *:80>
ServerAdmin admin@myserver.com
ServerName demo.myserver.com
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / ajp://localhost:8009/demo/
ProxyPassReverse / ajp://localhost:8009/demo/
</VirtualHost>
so far so good. When I go to the http://demo.myserver.com it will pass to the 'demo' context in the tomcat and the page loads. The problem is in how the context-relative URLs in the page are created. The final relevant generated HTML looks like this:
<form action="/demo/loadDataSet" method="get">
<button type="submit">Load next dataset</button>
</form>
The thymeleaf template bit looks like this:
<form th:action="@{/loadDataSet}" method="get">
<button type="submit">Load next data set</button>
</form>
Once I click on such button the URL used is http://demo.myserver.com/demo/loadDataSet which fails with 404 because there is no mapping for the 'demo' context in my 'demo' subdomain. What I would like to know is what to do to generate the html so it looks like this:
<form action="/loadDataSet" method="get">
<button type="submit">Load next dataset</button>
</form>
Thanks guys