On 04/09/2012 09:54 PM, Richard Frovarp wrote:
I can verify with the 5.3 archetype, but it certainly seems to me that
production mode of false lets the URLs be relative, but when you set
it to true it starts to do extra work and looking to see if pages are
marked as secured. I'm finding it in an odd way because everything on
my application servers are behind HTTPS for every single request.
mvn archetype:generate -DarchetypeCatalog=http://tapestry.apache.org
<http://tapestry.apache.org/>
mvn jetty:run
Go to localhost.
Look at URLs and they are relative.
Change to production mode, restart jetty, look at URLs and they are
relative.
Proxy to Jetty from HTTPS using HTTP, URLs are relative in both modes.
Create a war of the code, put it under Tomcat. Hit Tomcat directly at
8080 over HTTP and URLs are all relative in production mode true and false.
Proxy to Tomcat using mod_proxy_ajp.
Start up Tomcat, hit HTTPD with HTTPS and proxy via AJP to Tomcat the
menu looks like this:
<div class="menu">
<ul>
<li class="current_page_item">
<a href="http://myhost/url-test/">Index</a>
</li>
<li>
<a href="http://myhost/url-test/about">About</a>
</li>
<li>
<a href="http://myhost/url-test/contact">Contact</a>
</li>
</ul>
</div>
Add -Dtapestry.production-mode=false to JAVA_OPTS, restart Tomcat,
refresh the page and the menus looks like this:
<divclass="menu">
<ul>
<liclass="current_page_item">
<ahref="/url-test/
<view-source:https://wings.cc.ndsu.nodak.edu/url-test/>">Index</a>
</li>
<li>
<ahref="/url-test/about
<view-source:https://wings.cc.ndsu.nodak.edu/url-test/about>">About</a>
</li>
<li>
<ahref="/url-test/contact
<view-source:https://wings.cc.ndsu.nodak.edu/url-test/contact>">Contact</a>
</li>
</ul>
</div>
So this certainly looks like a bug. Production mode changes URLs to
absolute under AJP proxying only. At this time I don't know it if is
Tomcat only, or if I did AJP to another container one would see the same
results.