Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

include directive question in java black belt

 
Renu Radhika
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP file includes a JSP fragment. The JSP file is already compiled. The fragment was changed after the compilation.

Which type of include will not use the new version of the fragment?

1)<%@ include file="..." %>
2)<jsp:include>
3)It depends on the underlying JSP container.
4)It depends on the underlying operating system.

I thought the answer is 3.can any one explain
 
Sreeraj G Harilal
Ranch Hand
Posts: 310
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the answer is 1.May be because of its a static include.
I am not sure.
 
Renu Radhika
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no i have heard some containers check whether the included file has changed and add it,so I think it should be 3
 
Renu Radhika
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone please help me out in this...I am totally confused
 
Renu Radhika
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://java.sun.com/products/jsp/syntax/2.0/syntaxref209.html#1003408

check this in the above link

Some of the behaviors of the include directive depend on the particular JSP container you are using, for example:

The included file might be open and available to all requests, or it might have security restrictions.
The JSP page might be recompiled if the included file changes.


so my guess was correct
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic