• 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
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Session-based authentication

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm developing some intranet apps in JSP and need to build a login checker mechanism. Here's what I want to do:
on each page, include loginCheck.jsp.
logincheck simply looks for a session variable, accessLevel. if it is null or not high enough for that page, it should redirect to login.jsp
sounds simple. but whenever I try a jsp:forward or a sendRedirect, I get an error regarding page buffering. I've even put the jsp:forward at the _very first_ line of code, and it still gets the error.
can someone help me out: please explain why it's causing the error when the forward command is on the first line of code and where does the page _really_ begin writing itself out to the browser. Also, if there are any tutorials available on doing this then a link would be appreciatred, or if anyone has created a better solution to managing session-based authentication, I'd love to hear about it. I'm an ASP veteran moving into JSP, so I'm all ears (and eyes) for new ways of doing the same old things.
thanks
Zman
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic