This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Headfirst Servlets and Jsp <c:set> pg.457 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Headfirst Servlets and Jsp <c:set> pg.457" Watch "Headfirst Servlets and Jsp <c:set> pg.457" New topic
Author

Headfirst Servlets and Jsp <c:set> pg.457

Neil Muya
Ranch Hand

Joined: Oct 26, 2009
Posts: 30
Hi Ranchers, I'm just confused with this line in Headfirst Servlets and Jsp <c:set> pg.457.

It say's here that:

"You can never have both the "var" and "target" attributes in a <c:set>."

But when I try this block of codes it's working fine.

Here is the servlet doGet:


Here is the Jsp:


Hi ranchers hope you could help me!

Thanks!
Mathew Lee
Ranch Hand

Joined: Jun 08, 2009
Posts: 238
i think you can use both together..
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

The JSP specification does not say anything in this case. There are only four syntaxes expected :

If it's not one of these, I guess that it's up to the container to decide what to do.


[My Blog]
All roads lead to JavaRanch
Neil Muya
Ranch Hand

Joined: Oct 26, 2009
Posts: 30
Hi guys,

Hmmm.. Does this mean that Headfirst Servlets and Jsp Rules regarding <c:set> is with an older version of jstl?

I am wondering on what rules to follow for the exam SCWCD 5..


Quite confused..

But anyway thanks for the reply guys.

Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1645
    
  25

Hi Neil,
Hmmm.. Does this mean that Headfirst Servlets and Jsp Rules regarding <c:set> is with an older version of jstl?

No, they are correct: don't use both of them at the same time (although you can)
I am wondering on what rules to follow for the exam SCWCD 5..

The exam always follows the official specifications which means one of the four possibilities that Christophe gave you

Regards,
Frits
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Headfirst Servlets and Jsp <c:set> pg.457
 
Similar Threads
value for the useBean class attribute Invalid Problem
Problem in accessing the Map in c:forEach loop of JSTL
Problem in accessing c:set tag.
JSTL c:forEach not working
how to use scope in target version of c:set