• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

logout for SSO

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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]
 
Do Re Mi Fa So La Tiny Ad
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic