This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSTL problem

 
paul alvin
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this code



The page must display the create news item link but it doesnt. When I tried to change the value of the salary to 121 it shows the page. Whats wrong here?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64967
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you mixing JSTL, EL and scriptlets? That's just a big old mess and asking for trouble.

What is the purpose of this line: <c:set var="salary" scope="session" value='<%= session.getAttribute( "theName" ) %>' /> ???

All it does is to take a scoped variable named theName and copy it to salary. Why? And why use a scriptlet at all when just ${theName} could be used?

What's 121? Why is this magic number hard coded into the page? What does it men?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic