• 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

Redirect to Login page if Request is null.

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have basic application.which has following line of execution.

1)Login Page
2)if user name and password is correct than redirect to Home page. else
3)redirect to Login page.

now i want to do that.

if user directly goes to Home by any mean he/she should be redirected to login page.

currently if i go directly to Home it is showing Request paremeter as null and can not process request. so what kind of authentication should I provide at controller end.

This is controller code.


error i am getting.


Thanks in advance for your help.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All that can be handled with Spring Security. I would look at the SpringFramework documentation and see how to set up and use Spring Security.

Mark
reply
    Bookmark Topic Watch Topic
  • New Topic