| Author |
Avoiding "Directory Listing For xyz" for a Web Application
|
Naresh Shaan
Greenhorn
Joined: Mar 18, 2006
Posts: 22
|
|
Hi, I have been working on jboss for quite some time. the HOT Deployment feature is simple amazing. But Am worried about one thing. i have a simple web application. with few html , jsp's and servlets. let us take the following directory structure for my Simple.war application. Simple.war | |--Jsps/One.jsp |--WEB-INF/ when i point my browser to localhost:8080/Simple/Jsps i get the Directory listing of files available in my public folder(Files out side WEB-INF) of my application is there any way to prevent exposing my public files like, html pages, jsp's and few images i have used in my application. if i give "localhost:8080/Simple/Jsps" then my browser should display some message other than displaying the directory Listings Thanks!!!
|
"The greatest pleasure in life is doing what people say you cannot do." - Walter Bagehot
|
 |
Jaikiran Pai
Marshal
Joined: Jul 20, 2005
Posts: 8143
|
|
Yes, you can. There's a web.xml under %JBOSS_HOME%\server\default\deploy\jbossweb-tomcatxxx.sar\conf folder. Change the value of the 'listings' param for the default servlet to false: By default, the value is true.
|
[My Blog] [JavaRanch Journal]
|
 |
Naresh Shaan
Greenhorn
Joined: Mar 18, 2006
Posts: 22
|
|
|
Thanks A Lot JaiKiran!!!
|
 |
naveen gupta
Ranch Hand
Joined: Apr 12, 2006
Posts: 129
|
|
|
i had the same problem. But after changing it to false it didn't solved my problem. help me
|
 |
Jaikiran Pai
Marshal
Joined: Jul 20, 2005
Posts: 8143
|
|
|
Where did you change that value? Which file in which folder? Post the contents of the changed file. And did you restart the server after the changes?
|
 |
 |
|
|
subject: Avoiding "Directory Listing For xyz" for a Web Application
|
|
|