开发者

Single Sign-on across Tomcat servers without clustering

We have several Tomcat servers serving content for a single domain (via an Apache httpd front end.) We do this to balance memory usage on one of our servlets. That is, each server provides the same web application, but for a different data set. We'd like to implement single sign-on on our website.

In other words, we have httpd configured so that a visitor to http://example.com/reports开发者_如何学JAVA/a/ goes to reports.war on Tomcat server A, while http://example.com/reports/b/ goes to reports.war on Tomcat server B. Each URL is for a separate report, and we can't fit both reports in RAM on a single server.

As I understand it, we can't use Tomcat clustering because that's designed for server replication, i.e. identical servers with identical data. I've looked into session sharing via Tomcat's PersistentManager and a JDBC Store, but that appears to be designed for caching sessions, rather than sharing them.

Am I missing something, or is this going to require a fair amount of custom coding? (I'm willing to try another open source servlet container, such as JBoss or GlassFish, if they have this built in.)


As they are on the same domain you could use a cookie approach, and set an SSO flag or some similar attributes into the cookie on the first webapp on successful login, and read them in the other web app.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜