Long time user, first time writer...
Been using 1.0.1 for a while now and had a happy application. I'd
rather Tomcat handled my CSS, JavaScript, and imaging requests, so I
specify in my web.xml what URI pattern to send to the Noelios
ServerServlet. This presents a problem now that I want multiple URI
patterns to be sent to the ServerServlet.
Here is my web.xml snippet:
<web-app>
...
<context-param>
<param-name>org.restlet.application</param-name>
<param-value>com.mypackage.MyApplication</param-value>
</context-param>
<servlet>
<servlet-name>MainServer</servlet-name>
<servlet-class>com.noelios.restlet.ext.servlet.ServerServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>MainServer</servlet-name>
<url-pattern>/abc/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>MainServer</servlet-name>
<url-pattern>/xyz/*</url-pattern>
</servlet-mapping>
...
</web-app>
Here is my Application:
public class MyApplication extends Application
{
...
public Restlet createRoot()
{
return new MyRouter(getContext());
}
}
But when the router matches, it always takes the remaining part, which
strips off the /abc or the /xyz and doesn't match. Should I use a
custom route matcher? Is it easier to write something that will obtain
the CSS, JavaScript, and images from the WAR's path and just have all
requests proceed through the ServerServlet?
Many thanks,
Dustin
--
Dustin N. Jenkins | Tel/Tél: 250.363.3101 | [EMAIL PROTECTED]
facsimile/télécopieur: (250) 363-0045
National Research Council Canada | 5071 West Saanich Rd, Victoria BC.
V9E 2E7
Conseil national de recherches Canada | 5071, ch. West Saanich, Victoria
(C.-B) V9E 2E7
Government of Canada | Gouvernement du Canada