h1

Get a file request to jetty maven web project via web.xml

December 17, 2010

When using a maven managed POM project which has an embedded jetty server, I wanted to be able to direct some requests straight to a file in the webapp directory rather than being handled by the servlet code. I found that adding the following to src/main/scala/webapp/WEB-INF/web.xml allowed me to do this.

        <servlet-mapping>
         <servlet-name>default</servlet-name>
         <url-pattern>filename.ext</url-pattern>
        </servlet-mapping>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: