• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Q 36: Javaranch Mock exam.....

 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a modified form of Q 36:
True or False:
Files in the WEB-INF directory can not be served to the client.

Answer: TRUE.
I choose FALSE.
While I agree that clients cannot directly access files in the directory WEB-INF, a server can serve them to the client.
Afterall that is what a Servlet does, doesn't it?
Ambiguous to me........
Any opinions....
Thanks.
- satya
 
faiza haris
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i kinda interpretted it like...serve to client,make visible...like serving in a plate ....
 
Terence Doyle
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
As the client cannot send a request to the server for any specific file in that directory I think the statement is correct.
Bye
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Support Terences view.
The servlet-file is not served to the client. The servlet is an extension to the WebServer that produces something which is send to the client. The produced stuff is different from the file itself. Sounds like confusing philosophy.
Axel
[ February 16, 2002: Message edited by: Axel Janssen ]
 
Guy Allard
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi - The Servlet Specs, section 9.4, second paragraph, last sentence:
No file contained in the WEB-INF directory may be served directly to a client.

Regards, Guy
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If its in the Spec, then there's no argument, I guess.
Thanks.
- satya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic