aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Single String Parameter Values? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Single String Parameter Values?" Watch "Single String Parameter Values?" New topic
Author

Single String Parameter Values?

Xiaoxiao Lam
Greenhorn

Joined: Mar 04, 2006
Posts: 27
Hi,
I don't know if it's because my English is not good, I don't understand this sentence which is one of the right statements about EL implicit objects:

"The implicit object param is a Map that maps parameter names to single String parameter values."

What does the "single" word mean here? Does it mean only one value for each name? (If so, I don't think this statement is right.) Or it means that the values can't be String array? Maybe this is a silly question, but I am really confused. Thank you.


SCJP 1.4<br />SCWCD 1.4
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

"The implicit object param is a Map that maps parameter names to single String parameter values."

It means : One paramter name returns one String.
It simply calls ServletRequest.getParameter(String name), which returns only one String. (the first one of the array if there are several)

If you want to get all values, you should use the implicit object "paramValues".


[My Blog]
All roads lead to JavaRanch
MInu
Ranch Hand

Joined: Oct 09, 2003
Posts: 517
My understanding is,

Param is a map (name value pair).

The implicit object param is used when there is one value(single parameter value) for one param name(single parameter name).

If you have multiple values for a single parameter name ,then you can use paramValues implicit object.

Thanks...


God Gave Me Nothing I Wanted<br />He Gave Me Everything I Needed<br /> - Swami Vivekananda
Xiaoxiao Lam
Greenhorn

Joined: Mar 04, 2006
Posts: 27
I understand now. Thank you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Single String Parameter Values?