• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EL!!

 
Sharanya Sharma
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

As we know the implicit object "initparam" references to the context init param. I was curious to know how do we get config(mapped to JSP in the DD) init params through EL implicit objects.

In the Scriptless JSPs chapter pg 419 Q4 the TheBean class has a constructor and hence does not have a no-arg constructor. As we know that if the usebean has to create new instance of the bean class the class should have the no-arg constructor. I think none of the options can create new instance of the "TheBean" given in question. Can anybody tell me if I my understanding is wrong.

Thx,
Sharanya
 
Sharanya Sharma
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can anybody help me by answering the questions

Sharanya
 
Lalitha Mouli
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sharanya,

As we know the implicit object "initparam" references to the context init param. I was curious to know how do we get config(mapped to JSP in the DD) init params through EL implicit objects.

Do you mean to ask, how would you retrive initparams that are mapped to a particular servlet (instead of context param which is for the entire web app), I mean a servet name mapped to a JSP which contains init param ?

For Question 2, I think "no arg constructor " means, a constructor without any parameters/arguments, I do see one in line 4. The compiler provides one, only if you have no constructors at all. Makes sense ?


Please correct me if i am wrong....

Cheers
mouli
SCJP1.4 SCWCD1.4 (preparing...)
 
Sharanya Sharma
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks for the reply.

I overlooked the constructor and thought it was an arg constructor.. Sometimes I need a second eye to look in to things

Yae, I wanted to know how can we retrieve the parameters set at the servlet config level in the DD using impicit objects.

Rgds,
Sharanya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic