in a J2EE application, if the user explicitly displays the name of the destination page, 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 that says, "Not where you belong." I want to avoid providing index.jsp in all folders / subfolders of my application.
The GlassFish application server is used. The application also uses the Struts2 framework, although not all code is in struts2. Some code uses traditional servlets
source
share