• 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
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

In HFS mock exam chapter 8 Pg 417

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Given that a web application stores the webmaster email address in the servlet context initialization parameter called master-email.

which retrieves that value?

1 <a href='mailto:${initParam.master-email}'> email me</a>

2 <a href='mailto:${contextParam.master-email}'> email me</a>

3 <a href='mailto:${initParam['master-email']}'> email me</a>

4 <a href='mailto:${contextParam['master-email']}'> email me</a>

which answer is correct i just want to know bert. Can u tell the answer. Answer is given as option 3.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Senthil Kumar N:
Given that a web application stores the webmaster email address in the servlet context initialization parameter called master-email.

which retrieves that value?

1 <a href='mailto:${initParam.master-email}'> email me</a>

2 <a href='mailto:${contextParam.master-email}'> email me</a>

3 <a href='mailto:${initParam['master-email']}'> email me</a>

4 <a href='mailto:${contextParam['master-email']}'> email me</a>

which answer is correct i just want to know bert. Can u tell the answer. Answer is given as option 3.



That's true the answer is 3.
You can write EL like that!
But option 1 is wrong, because the right of dot must follow the java naming rule!
 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, there is a very minor mistake with option 3, and shud be covered in errata.

<a href='mailto:${initParam['master-email']}'> email me</a>

Notice the single quotes.
It should have been

<a href="mailto:${initParam['master-email']}"> email me</a>

or

<a href='mailto:${initParam["master-email"]}'> email me</a>

I feel the actual option 3 may fail because of its syntax(all single quotes). Doesn't it? Please let me know if anyone knows the answer for sure.

Thanks



Given that a web application stores the webmaster email address in the servlet context initialization parameter called master-email.

which retrieves that value?

1 <a href='mailto:${initParam.master-email}'> email me</a>

2 <a href='mailto:${contextParam.master-email}'> email me</a>

3 <a href='mailto:${initParam['master-email']}'> email me</a>

4 <a href='mailto:${contextParam['master-email']}'> email me</a>

which answer is correct i just want to know bert. Can u tell the answer. Answer is given as option 3.

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic