The subject pretty much says it all.

I've been trying to configure guice-servlet to serve two different
urls served by the same servlet class.  Each url's servlet needs to be
configured differently.

The equivalent web.xml would look like:

...
<servlet>
   <servlet-name>FooServlet</servlet-name>
   <servlet-class>com.example.TestServlet</servlet-class>
   <init-param>
      <param-name>message</param-name>
      <param-value>hello world</param-value>
   </init-param>
</servlet>
<servlet>
   <servlet-name>BarServlet</servlet-name>
   <servlet-class>com.example.TestServlet</servlet-class>
   <init-param>
      <param-name>message</param-name>
      <param-value>goodbye cruel world</param-value>
   </init-param>
</servlet>
<servlet-mapping>
   <servlet-name>FooServlet</servlet-name>
   <url-pattern>/foo.srv</url-pattern>
</servlet-mapping>
<servlet-mapping>
   <servlet-name>BarServlet</servlet-name>
   <url-pattern>/bar.srv</url-pattern>
</servlet-mapping>
...

This seems like it should be possible with Guice Servlet, but is it?
I've tried, but cannot seem to get it to work.


-- 
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