aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes doubts in HFJS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "doubts in HFJS" Watch "doubts in HFJS" New topic
Author

doubts in HFJS

narendra darlanka
Ranch Hand

Joined: Jun 17, 2005
Posts: 66
hi,
i got doubts regrading two questions in HFJS
1.) (chapter using jsp,page 330, coffee cram question 6)
<%@ page isELIgnored="true" %>
the answer is given as
E ) this page directive will only turn off EL evaluation if the DD declares a <el-ignored>true</el-ignored> element with the URL
pattern that includes this jsp
i doubt the answer to be
D ) this JSP containing this directive should NOT have any EL code evaluated by container
------------------------------------------------------------------
2.)(chapter scriptless jsps,page 356 ,be the container,question 3 )
what happens when

is forwarded an request from the servlet having the code

the answer is given as that it will print
----> Name is Evan
but isnt the 'p' object in the request scope and the jsp is trying to find it in the default pageScope ? making the code fail

thanks in advance

[ August 12, 2005: Message edited by: narendra darlanka ]

[ August 12, 2005: Message edited by: narendra darlanka ]
[ August 12, 2005: Message edited by: narendra darlanka ]

~naren<br /> scjp1.4<br /> scwcd1.4
Pawan Ramchandani
Ranch Hand

Joined: Aug 15, 2003
Posts: 78
Check errata


Pawan Ramchandani<br />*******************************<br />SCJP 1.4<br />SCWCD <br />*******************************<br />Everything is okay in the end. If it's not okay, then it's not the end.
kapil munjal
Ranch Hand

Joined: May 11, 2004
Posts: 298
page 330, you are correct.

page 354...when a jsp:useBean is used it tries to look for all the beans available in all scopes and it finds it in any scope and it uses it.

as it has only type in the useBean tag and no class in useBean tag...it is going to look for it and then it will use that bean and work on it.


Kapil Munjal
SCJP 1.4, SCWCD 1.4
narendra darlanka
Ranch Hand

Joined: Jun 17, 2005
Posts: 66
hi kapil
but for the same question in(page 356 ,ans page 416)
for question no 1. the reason for failure is said to be
"FAILS at request time ! The "person" attribute in stored at request scope
so the <jsp:useBean>tag won't work since it specifies only a type.the Container KNOWS that if you have only a type specifed there must be an bean attribute of that name and scope"
from what i infer from the above explanation ,i think that an useBean tag searchs only the specified scope and if it doesnt find that name it will try to create an new one using the 'class'

so if the same reasoning is applied question 2 must also fail isnt?
thanks in advance
 
Don't get me started about those stupid light bulbs.
 
subject: doubts in HFJS