Hello all,

I ended up patching 'service' function in ServletDefinition.java of
guice-servlet sources. Works for me now. I leave it here if enyone
interested. This works for me with both embedded Jetty and WAS 6.1
(RAD embedded one).

Regards, Luca.

public boolean service(ServletRequest servletRequest,
      ServletResponse servletResponse) throws IOException,
ServletException {

        String pathToTest = ((HttpServletRequest)
servletRequest).getPathInfo();

        if (pathToTest == null) {
                // No Websphere
                pathToTest =  ((HttpServletRequest)
servletRequest).getServletPath();
        }

    final boolean serve = shouldServe(pathToTest);

    //invocations of the chain end at the first matched servlet
    if (serve) {
      doService(servletRequest, servletResponse);
    }

    //return false if no servlet matched (so we can proceed down to
the web.xml servlets)
    return serve;
  }

On Nov 11, 2:12 pm, Luca Buzzoni <[email protected]> wrote:
> Hello Alen,
>
> thanks for your feedback. Unfortunately, we are stuck on this crappy
> application server, since all production environement is based on WAS 6.1 :(
>
> I'll give a try to the link you posted here.
>
> Best regards, Luca.
>
> On Thu, Nov 11, 2010 at 1:51 PM, Alen Vrečko <[email protected]> wrote:
> > The best workaround is to use a different server.
>
> > If you can get servlet filters working then you are home free.
>
> > One small problem is that WS swaps servletpath and pathinfo when no
> > servlet is matched (but defined in Guice-Servlet). See e.g.
> >http://goo.gl/kjgY3
>
> > My first workaround was to use a servlet filter to swap them back (it
> > proved problematic) now I am using a custom guice-servlet that has
> > this built-in (same solution as in the link). I am using 7.0.0.7 at
> > least they finally got servlet filters to work out-of-the-box. Didn't
> > imagine they would ever get such a basic thing right after such a long
> > time.
>
> > Cheers
> > Alen
>
> > On 10 nov., 17:55, lucabu <[email protected]> wrote:
> > > Hello,
>
> > > I am trying to make gwt-dispatch work under websphere 6.1, I tryied to
> > > make it work setting variables
>
> > > com.ibm.ws.webcontainer.enabledefaultservletrequestpathelements=true
> > > com.ibm.ws.webcontainer.invokefilterscompatibility=true
> > > prependSlashToResource=true
>
> > > But still no luck, I get a 404 error.
>
> > > The post onhttp://
> > groups.google.com/group/google-guice/browse_thread/thread/493a...
>
> > > doesn't provide a working solution for me; and post onhttp://
> > groups.google.com/group/gwt-dispatch/browse_thread/thread/8849...
>
> > > tells about 'adding a filter'. I didn't found a working solution on
> > > the web, since it seems this is a specific WS issue, which is acting
> > > in a very strange way.
>
> > > Does someone had success in working with that? It's possible to have a
> > > detailed workaround which can solve this issue?
>
> > > Any help whould be really appreciated.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "google-guice" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<google-guice%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-guice?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" 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-guice?hl=en.

Reply via email to