aspose file tools*
The moose likes Servlets and the fly likes WEB-INF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "WEB-INF" Watch "WEB-INF" New topic
Author

WEB-INF

Deepan Devadasan
Ranch Hand

Joined: Jan 25, 2007
Posts: 226
Hi..

Is it guaranteed by the spec that the container should return a 404 if the WEB-INF directory is accessed directly


Theepan Thevathasan
SCJP 1.4, SCWCD 1.4, SCMAD 1.0 SCBCD 1.3, MCP(.Net Frm 2.0 App Dev Fdn)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61434
    
  67

A link to the Specification is provided in the Servlets and JSP FAQs.

If you haven't read the Servlet Specification from cover to cover, you're doing it wrong.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
D Rog
Ranch Hand

Joined: Feb 07, 2004
Posts: 472

I return 403 for web-inf access, however I never read specs.


Retire your iPod and start with HD Android music player Kamerton | Minimal J2EE container is here | Light weight full J2EE stack | and build tool | Co-author of "Windows programming in Turbo Pascal"
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42289
    
  64
The spec merely says that nothing must be served directly out of WEB-INF. What happens if you do is up to the servlet container.


Ping & DNS - my free Android networking tools app
Deepan Devadasan
Ranch Hand

Joined: Jan 25, 2007
Posts: 226
Thanks to everyone...
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by D Rog:
I return 403 for web-inf access, however I never read specs.


You shouldn't need to do anything.
The container will take care of this for you.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
D Rog
Ranch Hand

Joined: Feb 07, 2004
Posts: 472

Unless you do a container.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61434
    
  67

Not to take this topic off into Neverland, but how does one write a container while not reading the Specification that describes it?
[ February 08, 2007: Message edited by: Bear Bibeault ]
D Rog
Ranch Hand

Joined: Feb 07, 2004
Posts: 472

It's the challenge. I learn spec reading the ranch.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: WEB-INF