This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Neil Muya
Ranch Hand
Posts: 30
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 238
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think you can use both together..
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Neil Muya
Ranch Hand
Posts: 30
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Saloon Keeper
Pie
Posts: 2167
57
Android Chrome Eclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic