• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

PageContext problem

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My code in JSP is:

<%Float f1=3f;%>
<% pageContext.setAttribute("flo1",f); %>
<% pageContext.setAttribute("flo1",f1,PageContext.SESSOIN_SCOPE); %>
<br>
f is :<%=pageContext.getAttribute("flo1")%>
<%--f1 is :<%=pageContext.getAttribute("flo1")%>--%>
<br>
<%--in session :pageContext.FindAttribute("flo1");--%>

When I try to compile it, it say:

An error occurred at line: 18 in the jsp file: /Dice.jsp
PageContext.SESSOIN_SCOPE cannot be resolved
15: <%Float f = 2f;%>
16: <%Float f1=3f;%>
17: <% pageContext.setAttribute("flo1",f); %>
18: <% pageContext.setAttribute("flo1",f1,PageContext.SESSOIN_SCOPE); %>


If PageContext.SESSOIN_SCOPE is static final variable of class then, why it does not resolve it?
 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check your spelling for "SESSION"

-Kalai
 
Don't mess with me you fool! I'm cooking with gas! Here, read this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic