how to stop directory structure from being viewable in J2EE apps
- by Omnipresent
in a J2EE app if user explicitly takes out the the ending page name then what is the best way to not show the directory structure?
Example:
/mycoolapp/somefolder/test.jsp
/mycoolapp/somefolder/ -- this will show all the files under 'somefolder'
What is the best way to redirect or show the user a page saying 'not where you belong'. I want to avoid providing index.jsp in all the folders/subfolders of my application.
Appserver being used is GlassFish. Also the app is using Struts2 framework, though not all of the code is in struts2. Some code is using traditional Servlets