Discussions

EJB design: Tomcat - File / dir Access problem

  1. Tomcat - File / dir Access problem (4 messages)

    Hi,

    I need help to solve the following issue.

    app1 is my web App with following stucture
    webapps/app1
    webapps/app1/docs
    webapps/app1/images

    I have a login.jsp located in webapps/app1/login.jsp.

    User will login to the app1 apps by using url
    E.g. www.myname.com/app1/login.jsp

    And then the can access the docs under webapps/app1/docs also they can access images under webapps/app1/images.

    Now if I am not a authorized user and if I type
    www.myname.com/app1/docs I am getting a listing of docs dir

    If I type www.myname.com/app1/images, I am getting a listing of images dir

    How to avaid this? Please help.

    When I type www.myname.com/app1/docs or www.myname.com/app1/images I should get some error message from tomocat.

    This apps is on Linux and it's a Tomcat/Apache.

    Thanks
    Rawar.

    Threaded Messages (4)

  2. Tomcat - File / dir Access problem[ Go to top ]

    Sorry forgot to ask if there is any setting in tomcat xml file to solve this issue or there is something elase that I have to do.

    Thanks
  3. Tomcat - File / dir Access problem[ Go to top ]

    Which version of Tomcat do you use?
    In Tomcat 5.5 there is a web.xml in the conf folder. Change the value for "listings" to "false" (see below).

    <servlet>
          <servlet-name>default</servlet-name>
          <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
          <init-param>
             <param-name>debug</param-name>
             <param-value>0</param-value>
          </init-param>
          <init-param>
             <param-name>listings</param-name>
             <param-value>false</param-value>
          </init-param>
          <load-on-startup>1</load-on-startup>
       </servlet>
  4. Tomcat - File / dir Access problem[ Go to top ]

    Hi,

    Thank you for the reply. I have 4.1.31 tomat version.

    Can you please let me know if the solution that you suggested will work on 4.1.31?

    Thanks again

    Rawar
  5. Tomcat - File / dir Access problem[ Go to top ]

    Sorry for the late answer ...
    I don't know if it works in Tomcat 4 because I haven't got this version.
    Maybe someone else could help ...?