This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes JSTL problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSTL problem" Watch "JSTL problem" New topic

JSTL problem

paul alvin

Joined: Nov 15, 2012
Posts: 15
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

Joined: Jan 10, 2002
Posts: 61092

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?

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: JSTL problem