This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread 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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSTL problem" Watch "JSTL problem" New topic
Author

JSTL problem

paul alvin
Greenhorn

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
Marshal

Joined: Jan 10, 2002
Posts: 60765
    
  65

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]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JSTL problem
 
Similar Threads
Problem with nested c:forEach
Implementation of google charts in JSP
Can I combine the 2 <c:if> EL expressions?
Struts / Tiles - changing which layout is used at runtime
Struts2 tags + tiles menu