Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

to get the session value in the JSTL Expression Language

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a session value() which I am able to get in the class file Navigationtag.java.

In this code the session value is in a string FK.
String FK=(String)pageContext.getSession().getAttribute("facilityKey");
out.print("FK"+FK);

but I have to display the session value in a searchbox with the code
input type=\"text\" size=\"9\" maxlength=\"8\" value=\"'$FK'\" name=\"searchbox\"/

Here the session value is not displayed instead it is taking the string '$FK' and displaying on the browser.I need the value to be displayed.
 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
EL will work only in a JSP page,
It is not $FK it should be ${facilityKey}.

Thanks.

Cheers!
[ December 11, 2008: Message edited by: Srikanth Nutigattu ]
 
Mothea Anil Kumar
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you srikanth..

anyways..I have just kept value = \"" + FK + "\" and it worked..
 
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What you say can be done always.
The answer that Srikanth gave you satisfies your question.


 
Sheriff
Posts: 67618
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Anil", please check your private messages for an important administrative matter.
 
reply
    Bookmark Topic Watch Topic
  • New Topic