This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Modern JavaScript for the Impatient and have Cay Horstmann on-line!
See this thread for details.
Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS 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

implement single sign on in java web applications

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have two java web applications.

Application1>> login jsp which sends the userid and password to servlet of webapplication1

i want to send this userid and password to servlet of another webapplication2 so that it can check with the database whether the credentials are right or wrong and thus implement single sign on.

so that when we click on login of webapplication1 and if the credentials are right we don't need to again login to web application 2.
 
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are many ways to do this. If you're going to be invoking another servlet on a different
application server/webapp you should learn how to encode your URLs or use https.

Better yet, use an under the cover approach such as JMS.

Pat.
 
Saloon Keeper
Posts: 6588
160
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The https://coderanch.com/how-to/java/SecurityFaq page lists several Java SSO solutions.
 
shashankbangalore kumar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
okay can you just help me out how to pass values from one servlet of webapplication1 to another servlet of web application2

i am begineer at java servlets.
 
Tim Moores
Saloon Keeper
Posts: 6588
160
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll be disappointed to hear this, but if you're a beginner at web apps then you should not be in charge of implementing security. It's way too easy to put insecure systems in place.
 
William P O'Sullivan
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
LOL @Tim

WARNING: Advanced.

servlet1 could use Apache HttpClient to send a http get or post to servlet2 on other server.
servlet1 would then have to interpret the response from servlet2.

There..

Pat.
 
My favorite is a chocolate cupcake with white frosting and tiny ad sprinkles.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic