• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

store variables in a jsp page scope with the spring framework

 
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to store variables in the jsp page scope with the spring 2.5.x framework?

This has compile errors.
What is the proper way to initialize pageContext?


Description Resource Path Location Type
The local variable pageContext may not have been initialized HwController.java /com.mycompany.monitoring.war/src/com/mycompany/monitoring/war line 59 Java Problem


 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why not just a request attribute? Or put it in the ModelAndView, which is probably more appropriate if you're using SpringMVC anyway.
 
albert kao
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:Why not just a request attribute? Or put it in the ModelAndView, which is probably more appropriate if you're using SpringMVC anyway.



I want to store some variables (e.g. number of rows per table) at page scope in Spring so that each page has its own group of variables. What is the proper way to do that? My approach of using the PageContext for that purpose may or may not be wrong.
reply
    Bookmark Topic Watch Topic
  • New Topic