tomcat - Directory listing vs welcomeServlet issue in Jetty 8 -


we have servlet 3 spring mvc web application deployed on tomcat in production.

the application (with minor tweaking) should able run on jetty 8. used in dev - environment , integration-testing on dev machines.

on our ci-system war deployed on tomcat , application working , passing tests.

when running on jetty 8 tests url ending in / fail, because directory listing returned rather welcome-file.

to work around tried disallowing dir listing configuring jetty defaultservlet:

<configure class="org.eclipse.jetty.webapp.webappcontext">  <!-- configure jetty defaultservlet disallow dir listing , explicitly allow welcomeservlets (a welcomeservlet in jetty terms <welcome-file> tag in web.xml pointing uri(file name) matched servlet)     note: init-params supported org.eclipse.jetty.servlet.defaultservlet can set directly on webappcontext using setinitparameter , prefixing init-param  'org.eclipse.jetty.servlet.default.' - e.g. 'org.eclipse.jetty.servlet.default.dirallowed' --> <call name="setinitparameter">     <arg>org.eclipse.jetty.servlet.default.dirallowed</arg>     <arg>false</arg> </call> <call name="setinitparameter">     <arg>org.eclipse.jetty.servlet.default.welcomeservlets</arg>     <arg>true</arg> </call> <call name="setinitparameter">     <arg>org.eclipse.jetty.servlet.default.redirectwelcome</arg>     <arg>true</arg> </call> 

and referencing our pom:

<plugin>                         <groupid>org.mortbay.jetty</groupid>                         <artifactid>jetty-maven-plugin</artifactid>                         <version>${jetty.maven.plugin.version}</version>                         <configuration>                             <contextxml>${basedir}/src/test/resources/jetty-context.xml</contextxml>                         ...                         </configuration> </plugin> 

however 404 not found when /citizen/ performed test. if manually add index.html url file served fine our spring static resource-handler.

are there more init-params can set on jetty make behave tomcat regarding welcome-file?


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -