Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Web application

 
Ravikanth Reddy Bapathi
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Ravikanth Reddy Bapathi
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For example, in the Tomcat default web.xml which controls the default servlet, you can define:


Bill
 
Ravikanth Reddy Bapathi
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic