I'm using VRaptor 4 with Wildfly 9, and I realized that my navigation on localhost, on refresh or nagivation to anothers pages, the HTML content is reloaded normally. But in another host (ex: production), i need clear the browser cache to refresh page. Example: If I send a message to show a alert in view and navigate between another pages, and I go to the previous page, the alert remains displayed. I need clear the cache to disable the alert.
How I can fix it?
You can set a response-header filter in the undertow subsystem.
Regarding the predicate filter syntax, see http://undertow.io/undertow-docs/undertow-docs-1.2.0/predicates-attributes-handlers.html. It's powerful. My example above would send a no-cache Cache-Control header for each and every jsp/jsf page, which might be quite evil in regards to user experience and server load. Choose whisely what not to cache.