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
Register / Login


JavaRanch » Java Forums » Java » Servlets
Reply 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 opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 48842

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


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About 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 opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 48842

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.

This message was edited 1 time. Last update was at by Bear Bibeault

 
 
subject: stopping the application from displaying index.jsp
 
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com