Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Hudson » Current page path in jelly?
Current page path in jelly? [message #1527222] Thu, 25 December 2014 02:23 Go to next message
Kaz Nishimura is currently offline Kaz NishimuraFriend
Messages: 89
Registered: December 2014
Member
I want to implement the 'redirect-back' function in Google Login Plugin. How can I get the current page path in jelly as the standard login form does?

Kaz Nishimura
Re: Current page path in jelly? [message #1548393 is a reply to message #1527222] Tue, 06 January 2015 00:57 Go to previous messageGo to next message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
Take a look at this jelly and see if that helps.

https://git.eclipse.org/c/hudson/org.eclipse.hudson.core.git/tree/hudson-core/src/main/resources/hudson/security/SecurityRealm/loginLink.jelly

Especially give attention to

<j:set var="from" value="${if (h.getSessionAttribute(request, 'from') !=null) h.getSessionAttribute(request, 'from');  else if (request.getParameter('from')!=null) request.getParameter('from'); else if (request.requestURI=='/loginError' || request.requestURI=='/login') '/'; else request.requestURI;}" />




Winston Prakash
Eclipse Hudson team
Re: Current page path in jelly? [message #1548558 is a reply to message #1548393] Tue, 06 January 2015 03:07 Go to previous messageGo to next message
Kaz Nishimura is currently offline Kaz NishimuraFriend
Messages: 89
Registered: December 2014
Member
Thank you for the information. Then, I can use ${from} for it? I will try it.

Kaz Nishimura
Re: Current page path in jelly? [message #1549253 is a reply to message #1548558] Tue, 06 January 2015 12:14 Go to previous message
Kaz Nishimura is currently offline Kaz NishimuraFriend
Messages: 89
Registered: December 2014
Member
${from} did not work in loginFragment.jelly as I expected. I must find another way.

[Update] ${request.getParameter('from')} was OK for non-AJAX login page. I must handle the AJAX case differently.


Kaz Nishimura

[Updated on: Tue, 06 January 2015 12:28]

Report message to a moderator

Previous Topic:Accessing Google APIs from plugins?
Next Topic:GitHub repository?
Goto Forum:
  


Current Time: Sat Oct 05 02:36:44 GMT 2024

Powered by FUDForum. Page generated in 0.04005 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top