File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Runtime Expression Value in jsp:forward 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 "Runtime Expression Value in jsp:forward" Watch "Runtime Expression Value in jsp:forward" New topic
Author

Runtime Expression Value in jsp:forward

Kamal Tripathi
Ranch Hand

Joined: Oct 02, 2008
Posts: 86
Source: Javabeat Mock Exam

Which of the following statements are true about Dynamic Inclusion?
a. In Dynamic Inclusion, when a request is made to the Source, the control is
transferred to the Target resource and the output from the target is included in the
source JSP.
b. The value for the attribute 'page' can be a request-time expression value.
c. In the case of Dynamic inclusion, the target resource can be a Servlet.
d. All the above.


Answer: D. I think answer should have been AC. Since by dynamic inclusion it mean <jsp:include> standard action. And in this case expression is resolved during translation so runtime expression values can't be resolved here. Am I correct in this assessment ??


Kamal Tripathi
SCJP 1.4 90%, SCWCD5 94%, Next SCDJWS--> In Naescent stage. Researching abt exam and material itself.
Abdul Rahman
Ranch Hand

Joined: Jul 04, 2008
Posts: 63
hi Kamal,

the answer to your qustion is D. All of the above.
a-In Dynamic Inclusion, when a request is made to the Source, the control is transferred to the Target resource and the output from the target is included in the
source JSP.
In Dynamic Forward, the control is transferred to the Target resource and the output from the source is included in the target JSP.
b - The value for the attribute 'page' can be a request-time expression value.
This is because the inclusion happens during runtime when the resource is being requested. so the rtexpr value is evaluated.
c- In the case of Dynamic inclusion, the target resource can be a Servlet.
In static inclusion the target can only be a mere static resource, without any runtime or request parameter, because in static inclusion, the file is included during translation time much before the resource is actually requested.

Hence all the three statements about the dynamic inclusion is true.

Hope that answers.


Abdul
SCJP5, SCWCD5, [scwcd wall of fame]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Runtime Expression Value in jsp:forward