This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Transfer the control to login page.

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Team,

I have a requirement whenever user wants to view any other jsp page except login page the control should be transfer to login page. How should i achieve it .

Thanks and Regards
Arvind
 
Sheriff
Posts: 67618
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So no one can ever see any other page? Sounds easy; jut have one page.

Or do you mean prior to authentication? (If so, be explicit). In that case, a filter that checks for authentication is the way to go.
 
arvind kushwaha
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Bear Bibeault,


I need to check prior to authentication. For Example suppose i had enter the gmail inbox url without providing authentication. So in that case login page is shown to me, not the gmail inbox url .

Same way i want in my project. I have no idea how to do that...Please suggest me or provide some example.


Thanks and regards
Arvind Kushwaha
 
Ranch Hand
Posts: 763
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use Servlet Filters.

Please refer below link

Securing J2EE Applications with a Servlet Filter
 
Sheriff
Posts: 16767
281
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

arvind kushwaha wrote:I have no idea how to do that...Please suggest me or provide some example.


Here's how you can build up your "search muscles" so that you can SearchFirst (<-- click) next time.

Step 1: Note down key words in answers

Bear Bibeault wrote:a filter that checks for authentication is the way to go.



Step 2: Note down key words in your question.

arvind kushwaha wrote:I need to check prior to authentication. For Example suppose i had enter the gmail inbox url without providing authentication. So in that case login page is shown to me, not the gmail inbox url .
... I have no idea how to do that...Please suggest me or provide some example.



Step 3: Think of words that would make your search criteria more specific.

Step 4: Go to Google and type in the words. Hit "Search" and viola! A bunch of links that you can go through to find your answer!

In this case, you would Google for: authentication filter login java
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic