aspose file tools*
The moose likes JForum and the fly likes logout for SSO Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "logout for SSO" Watch "logout for SSO" New topic
Author

logout for SSO

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi,

I have implemented Logout for My Application when u r press logout it must logout forum and as well as my application aslo. For this i have implemented as in my application as follows

I have implemented logout.java in Struts
Procedure 1.

HttpServletRequest req = ServletActionContext.getRequest();
HttpServletResponse res = ServletActionContext.getResponse();;
JForumExecutionContext ex = JForumExecutionContext.get();
RequestContext request = (RequestContext)req;
ResponseContext response = (ResponseContext)res;
JForumContext forumContext = null;
forumContext = new JForumContext(req.getContextPath().toString(),
SystemGlobals.getValue(ConfigKeys.SERVLET_EXTENSION),
request,
response
);

ex.setForumContext(forumContext);
JForumExecutionContext.set(ex);
UserAction us=new UserAction();
us.logout();

it gives NullpointerException in JForumExecutionContext. and some time it give can't cast struts context to "jforumcontext" message also.


Procedure 2.

I have written when user click logout .
in html as " /user/logout" in my and UserAction.java

logout(){

JForumExecutionContext.setRedirect(this.request.getContextPath()+"/logoutAdminUser.do")
}

"logoutAdminUser.do" for my application logout.(i am trying to redirect to my application logout )

This is give "/" Name space Exception.






Any body plz Help how to implement logout for SSO.



Thank you,
Gopal.G
[originally posted on jforum.net by gopal.g]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
from a HttpServletRequest and HttpServletResponse, you should create an instance of WebRequestContext and WebResponseContext - you're getting a cast excetion because you're, in fact, casting it to the wrong object.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: logout for SSO