• Post Reply Bookmark Topic Watch Topic
  • New Topic

hidedirectories

 
nitin kumar
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
I have developed a website in which the url is mainfolder/path/index.jsp
After the user logs in he tries to acess acess my subfolders under mainfolder/path by typing it in browser.Can anyone tell me how to avoid this

bye
nitin
 
eammon bannon
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add some security constraints to your directory.
(BTW: this isn't really a JSP question... )
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
most appservers will allow you to disallow directory browsing by setting a parameter in the configuration somewhere.
If the user then types in a directory without a filename he'll get a 403 (not allowed) error.
In any servlets/jsps you can handle them being called through incorrect channels if needed.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65516
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to set this up will vary with the servlet container or web server you are using. Which is it?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!