Outputting a .js file in an asp is no different than outputting html in an asp. I assume an asp is the same as a jsp in the fact that if you are not in a script tag (<% %>) then the content is put out to the response. For instance:
//this is in a jsp tag and would be processed server side
String someString = "this is a string";
This is not in a script tag and would be output as html.
I can display the contents of the variable using <%= someString %>
//I can also write to the response using the out stream
out.println("<b>this will be bold on the page</B>");