Resource injection in web applications