This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

stopping the application from displaying index.jsp  RSS feed

 
nikil shar
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 66142
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't include an index.jsp, and turn off directory browsing.
 
nikil shar
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the reply. How do i turn off directory listing ??


ta.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66142
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!