This seems like a strange thing to be doing as you'll break everything. But you could do it by removing the "JavaScriptSupport" MarkupRendererFilter from the MarkupRenderer pipeline:
YourAppModule.java
public static void contributeMarkupRenderer(OrderedConfiguration<MarkupRendererFilter> config) {
config.add("JavaScriptSupport", null);
}
Tapestry uses MarkupRendererFilters to add things like CSS and JS files to the HTML. Download the tapestry sources and take a look at TapestryModule.java. It seems like you might want to remove / tweak some of the core filters which include:
configuration.add("DocumentLinker", documentLinker);
configuration.add("JavaScriptSupport", javaScriptSupport);
configuration.add("RenderSupport", renderSupport);
configuration.add("InjectDefaultStylesheet", injectDefaultStylesheet);
configuration.add("ClientBehaviorSupport", clientBehaviorSupport);
configuration.add("Heartbeat", heartbeat);
configuration.add("ValidationDecorator", defaultValidationDecorator);
* edit *
References to after:*
have been changed to before:*
(since the first filter also runs last).
Another solution is to let all of the core filters run and contribute your own MarkupRendererFilter which is ordered "before:*". This filter could go through the DOM and remove anything you don't want before it's written to the Response output stream.