cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoppe, Michael" <Michael.Ho...@fiz-karlsruhe.de>
Subject defining static-welcome-file in CXFServlet configuration
Date Wed, 05 Sep 2012 11:12:42 GMT
Dear list,

I have an application that uses cxf version 2.6.2 and has several rest-endpoints. Additionally
it serves static pages.
So I configured the CXFServlet to serve requests with particular extensions as static pages.

My configuration in web.xml:
  <servlet>
    <servlet-name>CXFServlet</servlet-name>
    <display-name>CXF Servlet</display-name>
    <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
    <init-param>
      <param-name>static-resources-list</param-name>
      <param-value>
        (\S)+\.html
        (\S)+\.xml
        (\S)+\.jpg
        (\S)+\.png
        (\S)+\.gif
        (\S)+\.xsl
        (\S)+\.xsd
        (\S)+\.css
      </param-value>
    </init-param>
  </servlet>

This works fine.

Now I want to add a welcome-page when a user requests the application root-path.
Ie request to http://servername.com/escidoc returns http://servername.com/escidoc/index.html
I tried this by adding the following init-param to my servlet-configuration:

    <init-param>
      <param-name>static-welcome-file</param-name>
      <param-value>/index.html</param-value>
    </init-param>

So when I now call http://servername.com/escidoc, index.html is returned. So this works fine.

But when I call another static page like
http://servername.com/escidoc/test.xml
also index.html is returned.
Is this a bug or do I do something wrong?

Thanks for your help + greetings

M.Hoppe

Dr. Michael Hoppe
e-Science
IT, Development & Applied Research
Phone +49 7247 808-251
Fax +49 7247 808-133
michael.hoppe@fiz-karlsruhe.de


FIZ Karlsruhe - Leibniz Institute for Information Infrastructure
Hermann-von-Helmholtz-Platz 1
76344 Eggenstein-Leopoldshafen, Germany

www.fiz-karlsruhe.de<http://www.fiz-karlsruhe.de/>
[cid:image001.png@01CD8B66.26183C60]


Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message