On Thu, Sep 27, 2012 at 3:46 AM, echocoder <[email protected]> wrote:
I would like to pass in a variable from a JSP page, named mySession, to the login page of Xwiki, such as:
So when the user has valid credentials they will be redirected here:
/xwiki/bin/login/XWiki/XWikiLogin/?mySession=" + session.getId();
In this case "mySession" is a _request_ parameter (part of the request URL query string).
There is some a custom authentication class written in Java that extends XwikiAuthServiceImpl and inside of the checkAuth(XWikiContext context) method I am trying to retrieve the value I passed in from the JSP page.
String mySession = (String)context.getRequest().getSession().getAttribute("mySession");
Where did you set "mySession" as a session attribute? You only passed it as a request parameter, so you have to retrieve it with: String mySession = context.getRequest().getParameter("mySession"); Hope this helps, Marius
The value of mySession is always null. Does anyone know where I went wrong in trying to accomplish this?
-- View this message in context: http://xwiki.475771.n2.nabble.com/passing-a-session-variable-to-the-XwikiLog... Sent from the XWiki- Dev mailing list archive at Nabble.com. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs