John, thanks so much, this works. I added this as the filter:

  <filter>
    <filter-name>forwardFilter</filter-name>
    <filter-class>com.markww.usermaps.server.ForwardFilter</filter-
class>
    <init-param>
      <param-name>target</param-name>
      <param-value>UserMaps.jsp</param-value>
    </init-param>
  </filter>

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

test is working here:

  http://usermaps.appspot.com/

just forwards all urls like:

  http://usermaps.appspot.com/abc

to my gwt jsp project file. Spent a day trying to get this to work,
thanks again,

Mark




On Apr 6, 11:09 pm, John Patterson <jdpatter...@gmail.com> wrote:
> You could create a filter that is mapped to "/*" and does a forward to  
> your jsp.
>
> This one remembers the original path:
>
> public class ForwardFilter implements Filter
> {
>         public static final String SERVLET_PATH =  
> ForwardFilter.class.getName() + ".servletPath";
>         private String target;
>
>         public void destroy()
>         {
>         }
>
>         public void doFilter(ServletRequest request, ServletResponse  
> response, FilterChain chain)
>                         throws IOException, ServletException
>         {
>                 request.setAttribute(SERVLET_PATH, ((HttpServletRequest)  
> request).getServletPath());
>                 request.getRequestDispatcher(target).forward(request, 
> response);
>         }
>
>         public void init(FilterConfig config) throws ServletException
>         {
>                 target = config.getInitParameter("target");
>         }
>
> }
>
> On 7 Apr 2010, at 10:28, Mark wrote:
>
>
>
> > Hi,
>
> > I'm using GWT and GAE. I want to serve my project's one and only jsp
> > file no matter what url is entered by the user in their browser. So
> > the web.xml file looks like this:
>
> >  <welcome-file-list>
> >    <welcome-file>UserMaps.jsp</welcome-file>
> >  </welcome-file-list>
>
> >  <servlet>
> >    <servlet-name>indexpage</servlet-name>
> >    <jsp-file>UserMaps.jsp</jsp-file>
> >  </servlet>
> >  <servlet-mapping>
> >    <servlet-name>indexpage</servlet-name>
> >    <url-pattern>/*</url-pattern>
> >  </servlet-mapping>
>
> > when I run this locally, it works fine. Any of the following urls
> > serve my gwt app with UserMaps.jsp:
>
> >  http://localhost:8888/
> >  http://localhost:8888/JohnDoe
> >  http://localhost:8888/JaneDoe
>
> > when I publish to GAE, it stops working, none of the urls can find
> > UserMaps.jsp:
>
> >  http://usermaps.appspot.com/
> >  http://usermaps.appspot.com/JohnDoe/
> >  http://usermaps.appspot.com/JaneDoe/
>
> > I'm not sure if this should work, I'm looking at the reference here:
>
> >  http://code.google.com/appengine/docs/java/config/webxml.html#The_Wel...
>
> > My real goal is to support a twitter-like url mapping scheme where a
> > user can enter my domain/username, and I'll show them their customized
> > user page (by pulling some info out of the data store and dynamically
> > rendering a page for them),
>
> > Thanks
>
> > --
> > You received this message because you are subscribed to the Google  
> > Groups "Google App Engine for Java" group.
> > To post to this group, send email to google-appengine-java@googlegroups.com
> > .
> > To unsubscribe from this group, send email to 
> > google-appengine-java+unsubscr...@googlegroups.com
> > .
> > For more options, visit this group 
> > athttp://groups.google.com/group/google-appengine-java?hl=en
> > .

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to