Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Ranch Hand
Posts: 30
  • 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!
 
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think you can use both together..
 
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 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
  • 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.

 
Creator of Enthuware JWS+ V6
Saloon Keeper
Posts: 3097
255
Android Chrome Eclipse IDE
  • 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
 
Destiny's powerful hand has made the bed of my future. And this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!