This might look weird but I would like to serve a "dynamic" JavaScript file. In fact the source code of the js will be stored in the database which will allow me to modify it without redeploying the app.
Right now I'm thinking about writing a servlet for doing this. Is this the right tool or is there a better way? I don't want to reinvent the wheel.