This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
The <jsp:include> element allows you to include either a static or dynamic file in a JSP file. The results of including static and dynamic files are quite different.
From the scenario above, which one of the following sets of statements differentiates between static and dynamic inclusion of a file in a JSP page?
Choice 1 - If the file is static, the file is included a compile time. If the file is dynamic, the file recompiled for each request.
Choice 2 - If the file is static, the file name cannot be changed. If the file is dynamic, the file name can be changed. In both cases the included file acts on a request and sends back a result.
Choice 3 - If the file is static, its content is included in the calling JSP file. If the file is dynamic, it acts on a request and sends back a result that is included in the JSP page.
Choice 4- If the file is static or dynamic, the file name can be changed. If the file is dynamic, the included file acts on a request and sends back a result.
Choice 5 - If the file is static or dynamic, the file name cannot be changed. If the file is dynamic, the included file acts on a request and sends back a result
I marked the option "4". is that correct?
Tks.
SCJP | SCWCD | SCBCD | SCWSD 5 | SCEA (I) 1.4 | SCEA 5 | IBM SOA 669
hi , i would for 4th options . Plese let us know the answer.
Regards -santosh
SCJP1.4(96%) SCWCD -in progress
shweta bulbule
Ranch Hand
Joined: Mar 24, 2006
Posts: 30
posted
0
Please guys .. we are waiting for Mr KnowAll to answer this.
Thanks,<br />Shweta
singh santosh
Ranch Hand
Joined: Jan 13, 2006
Posts: 136
posted
0
hi shewta, can u explain this "Please Guys.. ".Cum up with a answer and not such comments .Let him Mr KnowAll reply but others can also reply .Right Miss..
-santosh
Steven Colley
Ranch Hand
Joined: Feb 18, 2005
Posts: 290
posted
0
Please, anyone for ensure this?
tks.
Bhavna Jharbade
Ranch Hand
Joined: Sep 08, 2005
Posts: 69
posted
0
Hi all, Felipe, Narendra & Santosh can u all please explain the options which u think are right. Because i am unable to understand the options itself.
Thanks in anticipation.
SCJP1.4 (86%)
Narendra Dhande
Ranch Hand
Joined: Dec 04, 2004
Posts: 950
posted
0
Hi Bhavana,
Choice 5 - If the file is static or dynamic, the file name cannot be changed. If the file is dynamic, the included file acts on a request and sends back a result
The first line , I assumed the file name passed to the jsp:include action. Once it is passed you can not change it.
The second line, If the resource is static the content of the file copied as it at the run-time.If you give .txt file , the contains of the .txt file is included in the response at run-time. But if the file is dynamic ( servlet or JSP), it process the resource and include the output of the JSP or servlet.
This is my understanding, so I give option 5 is correct.