Re: [Hypercontent-users] How to read groups.xml from the CAS server.
Brought to you by:
alexvigdor
From: Alex V. <al...@bi...> - 2007-02-16 14:18:16
|
If you check the headers with the firefox plugin I suggested, you can see which redirects the browser is actually following. I believe ajax requests can carry cookies. However, feel free to take another approach as you see fit. Alex On Feb 15, 2007, at 12:48 AM, tom tom wrote: > my doubts why Ajax.js does not handle this > > 1) redirection from http to https > > 2) how the session information carried when > redirection is happenning e.g JSESSIONID and also CAS > specific cookies > > > Other easy approach is define a servlet in HC which > will check the input userId exists in the groups.xml > That is reading the latest groups.xml data_file. > > Thanks > > > > --- tom tom <j_l...@ya...> wrote: > >> Yes I did a analysis (using JMeter) following is the >> sequence of redirections which I observed >> >> > 1)http://localhost:8080/hypercontent/testproject/applyForACourse/ > index.xml?passmode=page-edit-link&mode=login >> (initial hit) >> >> > 2)https://localhost:8443/cas/login?service=http://localhost:8080/ > hypercontent/testproject/applyForACourse/index.xml%3fpassmode% > 3Dpage-edit-link%26mode%3Dlogin%26command%3DLogin >> >> >> > 3)http://localhost:8080/hypercontent/testproject/applyForACourse/ > index.xml?passmode=page-edit- > link&mode=login&command=Login&ticket=ST-4-4MsyXgAAT2AuXBZEBJmK >> >> > 4)http://localhost:8080/hypercontent/testproject/applyForACourse/ > index.xml?mode=page-edit- > link&mode=login&ticket=ST-4-4MsyXgAAT2AuXBZEBJmK >> >> >> In the JMeter I can see the final output I mean the >> content of page-edit-link.vm file. >> >> >> >> >> >> >> >> --- Alex Vigdor <al...@bi...> wrote: >> >>> There is a redirect - in fact there should be two, >>> one from HC to >>> CAS, and then back from CAS to HC. Can you >> analyze >>> the headers and >>> report the series of redirects that occur, e.g. >> with >>> http:// >>> livehttpheaders.mozdev.org/ >>> >>> Alex >>> >>> On Feb 14, 2007, at 12:21 AM, tom tom wrote: >>> >>>> It looks to me there is a internal redirection >> to >>> CAS >>>> server within HC when we issue a URL as follows >>>> probably because of mode=login >>>> >>>> >>> >> > http://localhost:8080/hypercontent/testproject/applyForACourse/ >>> >>>> index.xml?passmode=page-edit-link&mode=login >>>> >>>> Is this the reason why the Edit link is not >> shown? >>>> >>>> >>>> >>>> Thanks >>>> >>>> >>>> --- tom tom <j_l...@ya...> wrote: >>>> >>>>> Thanks Alex, >>>>> >>>>> I modified the code but look my observations >>>>> >>>>> I followed the following steps >>>>> >>>>> 1) Close all the browser instances in my >> machine >>>>> >>>>> 2) Logged into uPortal via CAS >>>>> >>>>> 3) Could not see the Edit link which points to >> HC >>> in >>>>> my portlet, Also I tried with my sample jsp >>> (outside >>>>> uPortal) but result is the same. >>>>> >>>>> >>>>> but After that being in the same browser I hit >>> with >>>>> the following URL >>>>> >>>>> >>>> >>> >> > http://localhost:8080/hypercontent/testproject/index.html? >>> >>>> mode=login&passmode=page-edit-link >>>>> >>>>> Then it shows the following in the page >>>>> <div> >>>>> <a target="hc2-window" >>>>> >>>> >>> >> > href="http://localhost:8080/hypercontent/testproject? >>> >>>> mode=interactive&screen=edit">edit</a> >>>>> </div >>>>> >>>>> This is exactly what I want but just the Edit >>> link >>>>> is >>>>> not appearing. Previous occations above was >> only >>>>> appearing when I login to HC only (uPortal >> login >>> was >>>>> not enough). Which means somthing is working >>>>> >>>>> >>>>> Even though it is not applicable for us, the >> only >>>>> occation which I can see Edit link is (based on >>> my >>>>> previous mail) >>>>> >>>>> First login to HC and my client test page has >> the >>>>> following >>>>> >>>>> <script type="text/javascript" >>>>> language="javascript"> >>>>> >>>> >>> >> > loadToElement(document.getElementById('page-edit-link-div'),'http:// >>> >>>> >>> >> > localhost:8080/hypercontent/testproject/index.html?mode=page-edit- >>> >>>> link'); >>>>> </script> >>>>> >>>>> above is what I tried initialy >>>>> >>>>> >>>>> Following is the recent jsp file which I >> modified >>>>> based on your recent feedback. >>>>> >>>>> Should I need further modifications? >>>>> >>>>> <html> >>>>> <head> >>>>> </head> >>>>> >>>>> <body> >>>>> This is inside a sample HC page >>>>> <script type="text/javascript" >>> language="javascript" >>>>> >>>> >>> >> > src="http://localhost:8080/hypercontent/js/common.js"> >>>>> </script> >>>>> <script type="text/javascript" >>> language="javascript" >>>>> >>> >> src="http://localhost:8080/hypercontent/js/ajax.js"> >>>>> </script> >>>>> >>>>> <div id="page-edit-link-div"></div> >>>>> >>>>> <script type="text/javascript" >>>>> language="javascript"> >>>>> >>>> >>> >> > loadToElement(document.getElementById('page-edit-link-div'),'http:// >>> >>>> >>> >> localhost:8080/hypercontent/testproject/index.html? >>>> mode=login&passmode=page-edit-link'); >>>>> </script> >>>>> >>>>> >>>>> </body> >>>>> </html> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> --- Alex Vigdor <al...@bi...> wrote: >>>>> >>>>>> Try changing the link to >>>>>> >>>>>> >>>>> >>>> >>> >> > http://localhost:8080/hypercontent/testproject/index.html? >> > === message truncated === > > > > > ______________________________________________________________________ > ______________ > Any questions? Get answers on any topic at www.Answers.yahoo.com. > Try it now. > |