Dear Lincoln and Christen, thank you both for your help through this issue. I found out where the problem was. I had rewrite cdi integration and servlet jars in glassfish-4.0/glassfish/lib and glassfish-4.0/glassfish/domains/domain1/lib. I deleted them both and rewrite works now.
Do you play Magic?
Get TopDecked MTG, the #1 Magic App, built by players, for players. Free to use, forever.