0

I have application that need from res folder with images. I deploy the project under /webapp/proj and then I create new folder in /wepapp/proj with images. But I can't access the image folder from browser (Folder is with permisions 777), because I get 404 error code. How can I acces the folder?

nyanev
  • 11,299
  • 6
  • 47
  • 76

2 Answers2

1

Go to servers web.xmla nd change

<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>

the listing param to true

<init-param>
        <param-name>listings</param-name>
        <param-value>true</param-value>
    </init-param>
FUD
  • 5,114
  • 7
  • 39
  • 61
  • It's true in my web.xml but still don't list my dir – nyanev Aug 10 '11 at 05:24
  • ok 404 mean not found, can you check if you created the folder in the correct location i.e. the Web Content folder where you are putting the other html files which are accessible. – FUD Aug 10 '11 at 05:30
  • I put dir in `webapp/proj/images` – nyanev Aug 10 '11 at 05:35
0

Check you web.xml file. Make sure you don't have same servlet names for 2 different servlets

Yerbol
  • 1