Hi,

I am trying to use a catch-all filter to support something like
mod_rewrite on apache. The goal was to let users enter a username in
the url like:

   www.mysite.com/johndoe

and then I would generate a page for the user on the fly. I got help
here creating this filter to do that (which points any request back to
my projectname.jsp file, using GWT):

  <filter>
    <filter-name>myFilter</filter-name>
    <filter-class>com.me.project.server.ForwardFilter</filter-class>
    <init-param>
      <param-name>target</param-name>
      <param-value>project.jsp</param-value>
    </init-param>
  </filter>

  <filter-mapping>
    <filter-name>myFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

that works, but the rest of my servlets are now getting caught by the
filter and generating 404 errors:

  <servlet>
    <servlet-name>myServlet</servlet-name>
    <servlet-class>com.me.project.server.MyServiceImpl</servlet-class>
  </servlet>

  <servlet-mapping>
    <servlet-name>myServlet</servlet-name>
    <url-pattern>/project/myservlet</url-pattern>
  </servlet-mapping>

how can I have the filter leave these servlet requests alone? I tried
just forwarding them in the filter, but no luck:

  public void doFilter(ServletRequest request, ServletResponse
response, FilterChain chain)
    throws IOException, ServletException
  {
      if (servletPath.equals("/project/myservlet")) {
         request.getRequestDispatcher("com/me/project/server/
MyServiceImpl").forward(request,response);
         return;
      }
  }

I'm using the GWT RPC stuff, so not sure if this is why the filter
forwarding still is not working,

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to