This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

hidedirectories  RSS feed

 
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: 66184
146
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!