• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HFSJ Chapter 8 ,Question 7,page number 428

 
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello friends

which statements about the .dot and[]EL operators is true??

Is it correct or wrong???
In the book it is given that it is wrong!!
I thoght the answers are B,C,E and F.
Thank you very much
[ November 02, 2005: Message edited by: shanthisri mocherla ]
 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Shanthi,



This is wrong because "${header.User-Agent}" is subtracting 'Agent' from 'User'.The second statement runs fine.Hope this information helps.
best regards,
Radhika
 
shanthisri mocherla
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Radhika
Thank you for your reply. I think that User-Agent does not follow the java naming rules in the first statement.Am I right.??
${header.User-Agent} is in-correct.-first statement.
${header["User-Agent"]} is correct-second statement.

Thank you very much
Shanthi
 
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. When names doenst follow java standards you have to use [] operator instead of . operator. This is one of the benefits of using [] operator over . operator.
 
reply
    Bookmark Topic Watch Topic
  • New Topic