Win a copy of Svelte and Sapper in Action this week in the JavaScript 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

JSP page Authentiaction

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am developing a webapp using struts with a bunch of JSP pages.

A login screen ( outside my webapp) authenticates the user and forwards it to home page of my webapp.

Now if any user wants to access my jsp pages directly (assuming the user is unauthenicated) I need to forward him to the login page...

now i am not sure where i should write the code for this ..and what kind of code should i write?

Can any one help me

Thanks
~K
 
author
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd suggest using container managed security or possibly the SecurityFilter if you're on a Servlet 2.3 container.
 
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sometime you can use session scope to solve this problem.
 
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can read more about Struts and security:
  • Struts Best Practices
  • Using JAAS for Authorization and Authentication (with Struts)


  • ./pope
     
    Can't .... do .... plaid .... So I did this tiny ad instead:
    Thread Boost feature
    https://coderanch.com/t/674455/Thread-Boost-feature
      Bookmark Topic Watch Topic
    • New Topic