| Author |
Web application
|
Ravikanth Reddy Bapathi
Greenhorn
Joined: Apr 13, 2007
Posts: 27
|
|
Hi, can any one help me out in restricting the folder access from the client browser in a typical web application. Quick help is appreciated.
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
Originally posted by Ravikanth Reddy Bapathi: ... Quick help is appreciated.
The best way to get quick help is to ask a well formed question. Can you describe, in a little more detail, what it is that you're trying to do? [ June 24, 2008: Message edited by: Ben Souther ]
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
Ravikanth Reddy Bapathi
Greenhorn
Joined: Apr 13, 2007
Posts: 27
|
|
I would like to restrict the user from viewing all the folders and jsp's in my web application. He should be able to navigate into the application only through the URL provided by me. I would like to restrict him navigating into the application through the web context.
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
|
Most (all, that I know of) containers have configuration settings that allow you to disable directory browsing. Take a look at the documentation for the one that you're using.
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12271
|
|
For example, in the Tomcat default web.xml which controls the default servlet, you can define: Bill
|
 |
Ravikanth Reddy Bapathi
Greenhorn
Joined: Apr 13, 2007
Posts: 27
|
|
Where should I give these parameters, init param's are specified for the servlet, if i am not wrong. Could you please elaborate. My requirement is when i click on http://localhost:8080/<web-context>/ I am able to see all the folders and files present in the context. I want these listings to be invisible when ever client hits the url. [I am using Jboss 4.0.2 for deploying my app] Thanks. [ June 24, 2008: Message edited by: Ravikanth Reddy Bapathi ]
|
 |
Ravikanth Reddy Bapathi
Greenhorn
Joined: Apr 13, 2007
Posts: 27
|
|
williams, thanks i found it. I could able to do that by changing the below code <servlet> <servlet-name>default</servlet-name> <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class> <init-param> <param-name>debug</param-name> <param-value>0</param-value> </init-param> <init-param> <param-name>listings</param-name> <param-value>false</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> in web.xml of tomcat.
|
 |
 |
|
|
subject: Web application
|
|
|