views:

118

answers:

1

i have a folder of javascript files, is it possible to include all of the files under that folder automatically? something like

<jsp:include-all parentFolder='/javascript' extension='.js' /> 

OK to make it clear

i have an ajax application, with lots of js fragments, but i want to aggregate all of them into one big js file so to speed up application loading

now what i am doing is using <%@include .... %> to manually include all the js files

every time i change a js file name or add / remove js file, i have to come back the aggregation jsp file to edit it

+1  A: 

Use YUI compressor and a shot of simple java.io code to minify and combine multiple Javascript files into a single file right before deploy. You don't want to do this on every request.

BalusC