If I type in http://localhost:8080/examples/jsp/myjsp/ on the browser and if "myjsp" directory contains subfolders and files, it's shown on the browser. How do we prevent them not to appear on the browser? Are there any settings on web.xml file? Does it vary for different App servers? Thanks in advance.
Some of the web browsers have settings which do not allow users to see the folders in a directory if there is no index file. One quick and fast solution (if you don't have access to the web browser directly), is to throw in index.jsp (if it's JSP pages) or index.html documents into those folders (Blank pages of course) and it should take care of this.
if you dont get to the solution using server configuration files, then you can create an empty file named index.html (or index.htm or start.htm, depending on your server settings) and put it in the directory where you want to prevent listings. you could also write some message in this file like "your not allowed to list the content of this directory". in apache there is a entry in httpd.conf to prevent directory listings, perhaps there is also one on apache.