This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

implement single sign on in java web applications

 
shashankbangalore kumar
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.
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 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.
 
Tim Moores
Bartender
Posts: 2792
38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The http://www.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
Bartender
Posts: 2792
38
  • 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
Chrome IBM DB2 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic