Sure you can. Only thing you need to do is to set the appropriate content type.
<%@page contentType="text/javascript" %>
or
<%@page contentType="text/css" %>
Take care with the fact that some webbrowsers might be picky on the file extension used in the actual request URL. I have never tried it as I normally would use a Servlet
for those purposes, but I won't be surprised if especially MSIE won't eat that.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…