I'm using GAE and Guice, but I'm running into problems on the dev server. This is my web.xml
<filter>
<filter-name>guiceFilter</filter-name>
<filter-class>com.google.inject.servlet.GuiceFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>guiceFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Everything works great until开发者_JAVA百科 I decide to login, at which point it throws up a 404 cause it can't handle pages that start with /_ah
. This means I can't do logins on the dev server or look at the admin console.
Any ideas? I can't find how to add an exclusion filter to the URL matcher, and don't know which servlet GAE uses to serve development login and console :-/
Figured it out... I'm using regex to serve only my pages and ignore _ah
requests.
serveRegex("/[\\w]+").with(MainServlet.class);
This is what worked for me.
// ignore _ah
serveRegex("^/(?!_ah.*)").with(HomeServlet.class);
精彩评论