• Post Reply Bookmark Topic Watch Topic
  • New Topic

FAQ 40? how to pass params to declaration  RSS feed

 
Scott Bown
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Javaranch SCWCD FAQ 40) In your jsp page, the declaration code has no access to implicit objects; you have to pass these as parameters to the methods you declare.

So this does work because request is unavailable.

Hi, I'm slightly confused how you would pass in the request or any other implicit object to declaration code.

Even if I don't need to know for the exam it might be useful to know.

Thanks,

Scott
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess you are referring to SCWCD Hints, not FAQ
Implicit objects are common Java types. For example, the request object is of type ServletRequest. So you could declare a method having a ServletRequest type as parameter in a declaration :

and use it in a scriptlet :
 
Scott Bown
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cheers for response, i catch your drift
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!