aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes jsp:include Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "jsp:include" Watch "jsp:include" New topic
Author

jsp:include

Steven Colley
Ranch Hand

Joined: Feb 18, 2005
Posts: 290
Hi, again..

Please take a look at the following question:

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.

<jsp:include page="brew.jsp" flush="true">
<jsp aram name="favbeer" value="sprecher" />
</jsp:include>

Question:

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
Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 950
Hi

whant is the answer given. I will go for 5.

Thanks


Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0
singh santosh
Ranch Hand

Joined: Jan 13, 2006
Posts: 136
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
Please guys .. we are waiting for Mr KnowAll to answer this.


Thanks,<br />Shweta
singh santosh
Ranch Hand

Joined: Jan 13, 2006
Posts: 136
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
Please, anyone for ensure this?

tks.
Bhavna Jharbade
Ranch Hand

Joined: Sep 08, 2005
Posts: 69
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
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.

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp:include