aspose file tools*
The moose likes Servlets and the fly likes implement single sign on in java web applications Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "implement single sign on in java web applications" Watch "implement single sign on in java web applications" New topic
Author

implement single sign on in java web applications

shashankbangalore kumar
Greenhorn

Joined: Apr 10, 2012
Posts: 3
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

Joined: Mar 28, 2012
Posts: 860

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
Rancher

Joined: Sep 21, 2011
Posts: 2408
The http://www.coderanch.com/how-to/java/SecurityFaq page lists several Java SSO solutions.
shashankbangalore kumar
Greenhorn

Joined: Apr 10, 2012
Posts: 3
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
Rancher

Joined: Sep 21, 2011
Posts: 2408
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

Joined: Mar 28, 2012
Posts: 860

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: implement single sign on in java web applications
 
Similar Threads
how to implement single sign on for applications deployed in sun glass fish server
Problem in implementing Single Sign on
Need of Single-Sign-on
Websphere Programmatic Login
More on HttpSessionBindingListener?