4 Replies Latest reply on Sep 12, 2013 6:04 AM by Tomaz Cerar

    Accessing static welcome-file

    slrslr Newbie



      I deploy an EAR called servlet.ear which contains a servlet war called servlet-example.war, with a context-root "servlet-example:

      Just under servlet-example.war I have


      - WEB.INF/web.xml

      - index.html


      I want to do a welcome-file, so that accessing http://localhost:8080/servlet-example/ redirects to the index.html page.

      Putting this in web.xml does not work:






      But, redirecting to a servlet works. Example:















      With this config, accessing http://localhost:8080/servlet-example/ kind of redirects to http://localhost:8080/servlet-example/hello as expected.


      So my question is :

      - Do I place the index.html file at the wrong place ?

      - Is there a config or limitation that prevents accessing static files directly ?


      Thank you in advance.