File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes stopping the application from displaying index.jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "stopping the application from displaying index.jsp" Watch "stopping the application from displaying index.jsp" New topic
Author

stopping the application from displaying index.jsp

nikil shar
Ranch Hand

Joined: May 25, 2008
Posts: 116
hi all,
i have a web application "http://localhost:8280/testApp/createStar/....." .

When i enter "http://localhost:8280/testApp/" in the browser, it display the index.jsp. If i remove any reference to index.jsp file from web.xml it starts listing directories on the browser.

How do i make the server return an "Error" when i enter "http://localhost:8280/testApp/"


App server is Glassfish V3 Prelude


thanks in advance.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60748
    
  65

Don't include an index.jsp, and turn off directory browsing.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
nikil shar
Ranch Hand

Joined: May 25, 2008
Posts: 116
thanks for the reply. How do i turn off directory listing ??


ta.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60748
    
  65

That will be a Glassfish-specific setting. You'll need to read the docs.

In Tomcat it's an init-param to the default servlet.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: stopping the application from displaying index.jsp
 
Similar Threads
problem in accessing a servlet using iPlanet web server
Web Application Root
Server Configuration
UrlRewrite Rule works on tomcat 4.1.34 but fails on tomcat 5.0.28
Error accessing application in Tomcat 5