However if you dynamically generate your sitemap.xml or any other XML files using a servlet then this security will be a problem since the XML request will not make it to Tomcat/JBoss. This is when mod_rewrite comes to the rescue.
You can set up mod_rewrite to rewrite the sitemap.xml request to be a sitemap.do request.
RewriteRule ^/sitemap\.xml$ /sitemap.do [PT,L]
Then you can set up Struts to forward this request to sitemap.xml.
When I use dspel:include within a custom tag like below things work fine.
However when I add flush=”true” it fails silently.
The JSP page no longer renders after it gets to this line of code. What puzzles me even more is that the documentation says that if you do not explicitly set flush, flush happens automatically. Therefore theoretically adding flush=”true” should not have an effect though I do it because the documentation recommends doing it.
The above code is happening within a TargetingForEach droplet. It is running on an ATG 2006.3 Patch 2 app server with JBoss 4.0.4.GA.
I contacted ATG support about this issue and they responded very quickly. Basically they said don’t use flush=”true” on third party application servers and just rely on the automatic flush.
Entered on 07/29/2008 at 13:12:19 by Nicholas Glover:
You should note that JBoss 4.0.4 GA is not supported with any version of ATG and you should not be using it. Please stick with JBoss 4.0.3 SP1.
Also, it is imperative that you upgrade from your ATG version to the latest 2006.3 patch, patch 6. The latest patch has many bugfixes include a fix for one relating to flushing behavior, PR #134387.
Due to various bugs and issues encountered, use of the “flush” attribute with a 3rd party app server, is not really recommended. We are removing all docs for this feature in later versions of our documentation. In this case, flush=true is forcing an explicit flush on the current page; but if this is not set, a more “intelligent” auto flush is done that flushes top-level pages first and then progresses down the tree. This prevents problems with 3rd party app servers such as content getting rendered out of order. I recommend not messing with the “flush” setting.
Is there something you are trying to do that is not working that leads you to want to use the “flush” attribute?
Entered on 07/29/2008 at 15:02:57 by Nicholas Glover:
I had already entered the documentation bug about this previously, but I polished and published it for our site with what I learned when looking into this for a prior customer and when looking into it for you.