JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Java Certification » SCWCD  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友    訂閱主題
reply to topicthreaded modego to previous topicgo to next topic
本主題所含的標籤
無標籤
作者 Re:SCWCD Mock Exam [Re:swanky]
smallchickenray





發文: 15
積分: 0
於 2006-11-08 11:56 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
QUESTION NO: 131
Given:
1. public class Yo***ag extends BodyTagSupport { // 註: jute 不讓我打 Yoshi-Tag
2. public int doAfterBody() throws JspException {
3. Object obj = pageContext.getAttribute("anObject");
4. return 2;
5. }
6. }
Assuming that the Object reference returned in line 3 is not null, in what scope does that object reside?
A. page
B. session
C. request
D. application

Answer: A

可以請教答案為什麼是A嗎, 解答寫的我看不太懂耶QQ, pageContext不是會由page -> request -> session -> application依序找尋anObject這個屬性, 那為什麼答案會是page??


reply to postreply to post
作者 Re:31~40(5題) 解答 [Re:swanky]
peice





發文: 25
積分: 1
於 2006-11-21 18:32 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
QUESTION NO: 31
Given a tag library with the following tags:
˙A tag called getYoshi that has one attribute called hierarchy that accepts a dynamic value.
˙A tag called getChapter that has one attribute called num.
Which three options are valid of these custom tags in a JSP page? (Choose three)
A. <mT:getYoshi hierarchy="vol1,chap1"/>
B. <mT:getYoshi hierarchy="<mT:getChapter num=1/>"/>
C. <mT:getYoshi hierarchy="<mT:getChapter num="1"/>"/>
D. <%String chapter = "chap1";%> <mT:getYoshi hierarchy=<%=chapter%>/>
E. <%String chapter = "chap1";%> <mT:getYoshi hierarchy="<%=chapter%>"/>

Answer: A.C.E
============================================
答案C是不是錯的呢?... 我記得有規定不能在tag的attribute內加上另一個tag
還是1.4才變的呢?
下面這題是我從JWebPlus找到的類似題
======================================
Question
You are given a tag library that has:
1. A tag named getMenu that takes an attribute 'subject' which can be a dynamic value.
2. A tag named getHeading that takes an attribute 'report'.
Which of the following are correct uses of this library?




Select 3 correct options
a <myTL:getMenu subject="Finance"/>


b <myTL:getMenu subject="<myTL:getHeading report=1/>"/>


c <myTL:getMenu subject='<myTL:getHeading report="1"/>'/>


d <% String subject="HR";%> <myTL:getMenu subject="<%=subject%>"/>


e <myTL:getHeading report="2"/>

=============================================
General Comments
This is a confusing question but the answer is simple. You cannot embed one tag inside another tag's attribute list. (Although you can nest one tag inside another). So 2 and 3 are invalid. 1, 4 and 5 are pretty straight forward.


peice edited on 2006-11-21 18:51
reply to postreply to post
作者 Re:SCWCD Mock Exam [Re:smallchickenray]
Jerry_Huang





發文: 70
積分: 0
於 2007-02-12 19:05 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
smallchickenray wrote:
QUESTION NO: 131
Given:
1. public class Yo***ag extends BodyTagSupport { // 註: jute 不讓我打 Yoshi-Tag
2. public int doAfterBody() throws JspException {
3. Object obj = pageContext.getAttribute("anObject");
4. return 2;
5. }
6. }
Assuming that the Object reference returned in line 3 is not null, in what scope does that object reside?
A. page
B. session
C. request
D. application

Answer: A

可以請教答案為什麼是A嗎, 解答寫的我看不太懂耶QQ, pageContext不是會由page -> request -> session -> application依序找尋anObject這個屬性, 那為什麼答案會是page??


pageContext.getAttribute()為page scope
pageContext.findAttribute()才是依序由四個範圍尋找屬性


reply to postreply to post
作者 Re:101~110(7題) 解答 [Re:batpig]
Jerry_Huang





發文: 70
積分: 0
於 2007-02-12 19:09 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
batpig wrote:
QUESTION NO: 110
Which two are true about Web application archive files? (Choose two)
A. They must NOT be signed.
B. They may contain JAR files.
C. They must have a ".web" extension.
D. They may serve files from the META-INF directory.
E. They may contain JSP files in addition to HTML files.
F. They CANNOT define their dependencies in the manifest.mf file.

Answer: D.E

我看到有同樣題目,但答案是B.D,有人可以解答一下嗎??
謝謝


我也覺得是B.D.
E.為什麼不能放HTML??


reply to postreply to post
go to first page go to previous page  1   2   3  go to next page go to last page
» JWorld@TW »  Java Certification » SCWCD

reply to topicthreaded modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8