thanks for the help:
public class GuiceListener extends GuiceServletContextListener {
@Override
protected Injector getInjector() {
return Guice.createInjector(new GuiceModule());
public class GuiceModule extends ServletModule {
@Override
protected void configureServlets() {
super.configureServlets();
serve("/test/file").with(FileServlet.class);
also, I tried /test/file to no avail.
On Aug 31, 11:54 pm, "Dhanji R. Prasanna" <[email protected]> wrote:
> Also, try changing it to:
>
> serve("/test/file")
>
> Guice reads the entire request URI for dispatch.
>
> Dhanji.
>
> On Wed, Sep 1, 2010 at 2:53 PM, Dhanji R. Prasanna <[email protected]> wrote:
>
>
>
>
>
>
>
> > Can you paste the code in:
>
> > billco.test.guice.GuiceListener please?
>
> > On Wed, Sep 1, 2010 at 9:34 AM, Dan Billings <[email protected]> wrote:
>
> >> BTW I'm using Jetty
>
> >> On Aug 31, 6:27 pm, Dan Billings <[email protected]> wrote:
> >> > GuiceModule:
> >> > serve("/file").with(FileServlet.class);
>
> >> > Navigating to <localhost:port>/test/file gives me a 404
>
> >> > I know for a fact my listener is being called.
>
> >> > As a control, I have one explicitly mapped Servlet which works fine at
> >> > <localhost>/test/simple
>
> >> > 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>
> >> > <listener>
> >> > <listener-class>billco.test.guice.GuiceListener</listener-class>
> >> > </listener>
>
> >> > <servlet>
> >> > <servlet-name>SimpleServlet</servlet-name>
> >> > <servlet-class>billco.test.SimpleServlet</servlet-class>
> >> > </servlet>
> >> > <servlet-mapping>
> >> > <servlet-name>SimpleServlet</servlet-name>
> >> > <url-pattern>/simple</url-pattern>
> >> > </servlet-mapping>
>
> >> --
> >> 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%2bunsubscr...@google
> >> groups.com>
> >> .
> >> 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.