• 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • 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); %>
f is :<%=pageContext.getAttribute("flo1")%>
<%--f1 is :<%=pageContext.getAttribute("flo1")%>--%>
<%--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"

Don't mess with me you fool! I'm cooking with gas! Here, read this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic