aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Coffee Cram, Chap 11, Q 7 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 "Coffee Cram, Chap 11, Q 7" Watch "Coffee Cram, Chap 11, Q 7" New topic
Author

Coffee Cram, Chap 11, Q 7

sridhar row
Ranch Hand

Joined: Jan 16, 2008
Posts: 162

Which are true? (Choose all that apply.)
A. Lines 10 and 12 are equivalent in any type of JSP page.
B. Line 10 is not valid in a JSP document (XML-based document).
C. Line 11 will properly import the java.util package.
D. Line 12 will properly import the java.util package.
E. Line 13 will properly import the java.util package

Ans given is B and D.

Why is option A not true? Both 10 and 12 should work in kind of Jsp page
[ December 27, 2008: Message edited by: javajamba ]
Vishal Chugh
Ranch Hand

Joined: Oct 27, 2007
Posts: 177
Hi,

I think problem with "any type"

A. Lines 10 and 12 are equivalent in "any type" of JSP page.

See 12 will work fine in normal JSP page as well as in XML based JSP document(which is also a JSP page ). But 10 will work fine with normal JSP but wont work in 2nd type of JSP which is XML based.

To be honest , dono how I missed it earlier while doing this question, thanks you asked.

see also:
1 2

[ December 28, 2008: Message edited by: Vishal Chugh ]
[ December 28, 2008: Message edited by: Vishal Chugh ]
Ankit V Agrawal
Greenhorn

Joined: Nov 26, 2008
Posts: 15
<jsp irective.page import=�java.util.*� />

is not valid in a jsp PAGE...its only valid in a jsp DOCUMENT


SCJP 5.o, SCWCD 5.o
Vishal Chugh
Ranch Hand

Joined: Oct 27, 2007
Posts: 177
No its valid in JSP , i used it and it was fine
sridhar row
Ranch Hand

Joined: Jan 16, 2008
Posts: 162
Yeah problem is 'any type of Jsp page'.

In the book HFSJ it says
a normal JSP is a page, unless it�s written with the XML alternatives to normal JSP syntax, in which case it becomes a document.


So option A according to the HFSJ should also be true. Coz JSP page is not the same as JSP document is it?
Ankit V Agrawal
Greenhorn

Joined: Nov 26, 2008
Posts: 15
yes if you write line 12 the code becomes jsp DOCUMENT and would not be considered a jsp PAGE...and hence option A is not correct
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Coffee Cram, Chap 11, Q 7
 
Similar Threads
JSP actions tags - a mock exam question from HFSJ
Can anyone clear my questions?
Doubts in MockExam HFSJ
HF Custom Tag question
Error in request.getParameter