[xwiki-users] Modify velocity macro to send the name value paair as part of wiki URL?
i am using xwiki as wiki website for my banking application. i provided a link AppHelp on my application web page. I click this link and it takes me to xwiki application hosted on another tomcat instance.So i get in to MyAuthServiceImpl as i have given the value of xwiki.authentication.authclass=com.xpn.xwiki.user.impl.xwiki.MyAuthServiceImpl in xwiki.cfg. Inside this class i set xwikiContext.getRequest().getHttpServletRequest().setAttrrbute("customerType","permanent") and see my wiki welcome page. But now if i do any activity like click on link anywhere on wiki wapplication,i dont get the value of xwikiContext.getRequest().getHttpServletRequest().getAttrrbute("customerType"). I am sure there must be some way i can configure it from admin user credentials probably in velocity macros and send it as part of request every time. I need it as part of request only not in session.
Mohit, there's no way, I think, to insert a parameter at each request. Without putting in each link of course. Or without using a servlet filter. paul Le 6 févr. 2012 à 17:28, mohit gupta a écrit :
i am using xwiki as wiki website for my banking application. i provided a link AppHelp on my application web page. I click this link and it takes me to xwiki application hosted on another tomcat instance.So i get in to MyAuthServiceImpl as i have given the value of xwiki.authentication.authclass=com.xpn.xwiki.user.impl.xwiki.MyAuthServiceImpl in xwiki.cfg. Inside this class i set xwikiContext.getRequest().getHttpServletRequest().setAttrrbute("customerType","permanent") and see my wiki welcome page. But now if i do any activity like click on link anywhere on wiki wapplication,i dont get the value of xwikiContext.getRequest().getHttpServletRequest().getAttrrbute("customerType"). I am sure there must be some way i can configure it from admin user credentials probably in velocity macros and send it as part of request every time.
I need it as part of request only not in session. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi paul, i even don't see the username(with which i logged in) value somewhere inside the XWikiContext on further clicks on web pages after login. I inspected almost all the variables inside the but did not find anywhere On Mon, Feb 6, 2012 at 10:16 PM, Paul Libbrecht <[email protected]> wrote:
Mohit,
there's no way, I think, to insert a parameter at each request. Without putting in each link of course. Or without using a servlet filter.
paul
Le 6 févr. 2012 à 17:28, mohit gupta a écrit :
i am using xwiki as wiki website for my banking application. i provided a link AppHelp on my application web page. I click this link and it takes me to xwiki application hosted on another tomcat instance.So i get in to MyAuthServiceImpl as i have given the value of
xwiki.authentication.authclass=com.xpn.xwiki.user.impl.xwiki.MyAuthServiceImpl
in xwiki.cfg. Inside this class i set
xwikiContext.getRequest().getHttpServletRequest().setAttrrbute("customerType","permanent")
and see my wiki welcome page. But now if i do any activity like click on link anywhere on wiki wapplication,i dont get the value of
xwikiContext.getRequest().getHttpServletRequest().getAttrrbute("customerType").
I am sure there must be some way i can configure it from admin user credentials probably in velocity macros and send it as part of request every time.
I need it as part of request only not in session. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
This is all in the session. paul Le 6 févr. 2012 à 17:55, mohit gupta a écrit :
Hi paul,
i even don't see the username(with which i logged in) value somewhere inside the XWikiContext on further clicks on web pages after login. I inspected almost all the variables inside the but did not find anywhere
On Mon, Feb 6, 2012 at 10:16 PM, Paul Libbrecht <[email protected]> wrote:
Mohit,
there's no way, I think, to insert a parameter at each request. Without putting in each link of course. Or without using a servlet filter.
paul
Le 6 févr. 2012 à 17:28, mohit gupta a écrit :
i am using xwiki as wiki website for my banking application. i provided a link AppHelp on my application web page. I click this link and it takes me to xwiki application hosted on another tomcat instance.So i get in to MyAuthServiceImpl as i have given the value of
xwiki.authentication.authclass=com.xpn.xwiki.user.impl.xwiki.MyAuthServiceImpl
in xwiki.cfg. Inside this class i set
xwikiContext.getRequest().getHttpServletRequest().setAttrrbute("customerType","permanent")
and see my wiki welcome page. But now if i do any activity like click on link anywhere on wiki wapplication,i dont get the value of
xwikiContext.getRequest().getHttpServletRequest().getAttrrbute("customerType").
I am sure there must be some way i can configure it from admin user credentials probably in velocity macros and send it as part of request every time.
I need it as part of request only not in session. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
On 02/06/2012 11:28 AM, mohit gupta wrote:
i am using xwiki as wiki website for my banking application. i provided a link AppHelp on my application web page. I click this link and it takes me to xwiki application hosted on another tomcat instance.So i get in to MyAuthServiceImpl as i have given the value of xwiki.authentication.authclass=com.xpn.xwiki.user.impl.xwiki.MyAuthServiceImpl in xwiki.cfg. Inside this class i set xwikiContext.getRequest().getHttpServletRequest().setAttrrbute("customerType","permanent") and see my wiki welcome page. But now if i do any activity like click on link anywhere on wiki wapplication,i dont get the value of xwikiContext.getRequest().getHttpServletRequest().getAttrrbute("customerType"). I am sure there must be some way i can configure it from admin user credentials probably in velocity macros and send it as part of request every time.
I need it as part of request only not in session.
You're setting the attribute on the request context, which is only valid for the current *request*, not for an entire session. You should use something like: xwikiContext.getRequest().getSession().setAttribute(name, value) -- Sergiu Dumitriu http://purl.org/net/sergiu/
As i said in my original post i do not want to set it in session. Reason being is, i am opening two diffeernt wiki popup from parent window in amy application. So if i set any thing in session in one pop up window its also visible in another popup window which i dont want. Here is the starting of problem i set different request paramter for two wiki pop ups. when i click these two different links for two different pop ups, i see these parameters specific to each popup and i set them as attributes in request. but on further activity on these pop ups i do not get these parameters which i desperately need(probably xwiki code is using sendredirect though not sure). i can not set them in session because if i set them they are visible to both pop ups as session is same and i do not have identifier where i can identify which session attribute is for which request as class MyAuthServiceImpl is same. So i have to set them in request specific to pop ups. i am not getting how to get rid of this issue. On Tue, Feb 7, 2012 at 3:15 AM, Sergiu Dumitriu <[email protected]> wrote:
On 02/06/2012 11:28 AM, mohit gupta wrote:
i am using xwiki as wiki website for my banking application. i provided a link AppHelp on my application web page. I click this link and it takes me to xwiki application hosted on another tomcat instance.So i get in to MyAuthServiceImpl as i have given the value of xwiki.authentication.**authclass=com.xpn.xwiki.user.** impl.xwiki.MyAuthServiceImpl in xwiki.cfg. Inside this class i set xwikiContext.getRequest().**getHttpServletRequest().** setAttrrbute("customerType","**permanent") and see my wiki welcome page. But now if i do any activity like click on link anywhere on wiki wapplication,i dont get the value of xwikiContext.getRequest().**getHttpServletRequest().** getAttrrbute("customerType"). I am sure there must be some way i can configure it from admin user credentials probably in velocity macros and send it as part of request every time.
I need it as part of request only not in session.
You're setting the attribute on the request context, which is only valid for the current *request*, not for an entire session. You should use something like:
xwikiContext.getRequest().**getSession().setAttribute(**name, value)
-- Sergiu Dumitriu http://purl.org/net/sergiu/
______________________________**_________________ users mailing list [email protected] http://lists.xwiki.org/**mailman/listinfo/users<http://lists.xwiki.org/mailman/listinfo/users>
On 02/07/2012 12:44 AM, mohit gupta wrote:
As i said in my original post i do not want to set it in session. Reason being is, i am opening two diffeernt wiki popup from parent window in amy application. So if i set any thing in session in one pop up window its also visible in another popup window which i dont want.
Here is the starting of problem
i set different request paramter for two wiki pop ups. when i click these two different links for two different pop ups, i see these parameters specific to each popup and i set them as attributes in request. but on further activity on these pop ups i do not get these parameters which i desperately need(probably xwiki code is using sendredirect though not sure). i can not set them in session because if i set them they are visible to both pop ups as session is same and i do not have identifier where i can identify which session attribute is for which request as class MyAuthServiceImpl is same. So i have to set them in request specific to pop ups.
You're confusing the term "request" with something else. A request is just ONE request, an HTTP GET requested by the client and answered by the server. "Further activity" means other requests. Still, there might be something useful for you, thanks to the awesomeness of XWiki: maven.xwiki.org/site/xwiki-core-parent/xwiki-core/apidocs/com/xpn/xwiki/XWikiContext.html#setLinksQueryString(java.lang.String) You'd use it like this: xwikiContext.setLinksQueryString("customerType=permanent"); This isn't an add* method, so you have to set all the parameters that you need in one call, like: xwikiContext.setLinksQueryString("customerType=permanent&customerName=ACME&otherParam=some%20value"); Don't forget to URL-encode the values you put in the URL. What this does is that all future calls to the various getURL methods, like XWikiDocument.getURL or XWiki.getURL will automatically append this string to the query string of the returned URL. If you didn't hard-code any URLs in the interface, then they should keep transmitting these parameters for every subsequent request. This should be called very early in the request processing lifecycle, since it only affects the getURL calls that come after it, and it won't modify the URLs already generated.
i am not getting how to get rid of this issue. On Tue, Feb 7, 2012 at 3:15 AM, Sergiu Dumitriu<[email protected]> wrote:
On 02/06/2012 11:28 AM, mohit gupta wrote:
i am using xwiki as wiki website for my banking application. i provided a link AppHelp on my application web page. I click this link and it takes me to xwiki application hosted on another tomcat instance.So i get in to MyAuthServiceImpl as i have given the value of xwiki.authentication.**authclass=com.xpn.xwiki.user.** impl.xwiki.MyAuthServiceImpl in xwiki.cfg. Inside this class i set xwikiContext.getRequest().**getHttpServletRequest().** setAttrrbute("customerType","**permanent") and see my wiki welcome page. But now if i do any activity like click on link anywhere on wiki wapplication,i dont get the value of xwikiContext.getRequest().**getHttpServletRequest().** getAttrrbute("customerType"). I am sure there must be some way i can configure it from admin user credentials probably in velocity macros and send it as part of request every time.
I need it as part of request only not in session.
You're setting the attribute on the request context, which is only valid for the current *request*, not for an entire session. You should use something like:
xwikiContext.getRequest().**getSession().setAttribute(**name, value)
-- Sergiu Dumitriu http://purl.org/net/sergiu/
Thanks a lot Sergiu. I was looking eaxactly for same . But it introduced another issue, whenever i come on welcome page of wiki after login i see welcome page rendered twice(even other pages too ). Here is code snippet which i introduced context.setLinksQueryString(USER_NAME+"="+UserId+"&"+WIKI_TYPE+"="+wikiType+"&dummyPar=dummy"); If i comment above line , it works fine and renders only only once. Any input on how above code snippet making the page rending twice? On Tue, Feb 7, 2012 at 12:43 PM, Sergiu Dumitriu <[email protected]> wrote:
On 02/07/2012 12:44 AM, mohit gupta wrote:
As i said in my original post i do not want to set it in session. Reason being is, i am opening two diffeernt wiki popup from parent window in amy application. So if i set any thing in session in one pop up window its also visible in another popup window which i dont want.
Here is the starting of problem
i set different request paramter for two wiki pop ups. when i click these two different links for two different pop ups, i see these parameters specific to each popup and i set them as attributes in request. but on further activity on these pop ups i do not get these parameters which i desperately need(probably xwiki code is using sendredirect though not sure). i can not set them in session because if i set them they are visible to both pop ups as session is same and i do not have identifier where i can identify which session attribute is for which request as class MyAuthServiceImpl is same. So i have to set them in request specific to pop ups.
You're confusing the term "request" with something else. A request is just ONE request, an HTTP GET requested by the client and answered by the server. "Further activity" means other requests.
Still, there might be something useful for you, thanks to the awesomeness of XWiki:
maven.xwiki.org/site/xwiki-**core-parent/xwiki-core/** apidocs/com/xpn/xwiki/**XWikiContext.html#**setLinksQueryString(java.lang. **String)<http://maven.xwiki.org/site/xwiki-core-parent/xwiki-core/apidocs/com/xpn/xwiki/XWikiContext.html#setLinksQueryString(java.lang.String)>
You'd use it like this:
xwikiContext.**setLinksQueryString("**customerType=permanent");
This isn't an add* method, so you have to set all the parameters that you need in one call, like: xwikiContext.**setLinksQueryString("**customerType=permanent&** customerName=ACME&otherParam=**some%20value");
Don't forget to URL-encode the values you put in the URL.
What this does is that all future calls to the various getURL methods, like XWikiDocument.getURL or XWiki.getURL will automatically append this string to the query string of the returned URL. If you didn't hard-code any URLs in the interface, then they should keep transmitting these parameters for every subsequent request.
This should be called very early in the request processing lifecycle, since it only affects the getURL calls that come after it, and it won't modify the URLs already generated.
i am not getting how to get rid of this issue.
On Tue, Feb 7, 2012 at 3:15 AM, Sergiu Dumitriu<[email protected]> wrote:
On 02/06/2012 11:28 AM, mohit gupta wrote:
i am using xwiki as wiki website for my banking application. i provided
a link AppHelp on my application web page. I click this link and it takes me to xwiki application hosted on another tomcat instance.So i get in to MyAuthServiceImpl as i have given the value of xwiki.authentication.****authclass=com.xpn.xwiki.user.****
impl.xwiki.MyAuthServiceImpl in xwiki.cfg. Inside this class i set xwikiContext.getRequest().****getHttpServletRequest().** setAttrrbute("customerType","****permanent")
and see my wiki welcome page. But now if i do any activity like click on link anywhere on wiki wapplication,i dont get the value of xwikiContext.getRequest().****getHttpServletRequest().**
getAttrrbute("customerType"). I am sure there must be some way i can configure it from admin user credentials probably in velocity macros and send it as part of request every time.
I need it as part of request only not in session.
You're setting the attribute on the request context, which is only valid for the current *request*, not for an entire session. You should use something like:
xwikiContext.getRequest().****getSession().setAttribute(****name, value)
-- Sergiu Dumitriu http://purl.org/net/sergiu/ ______________________________**_________________ users mailing list [email protected] http://lists.xwiki.org/**mailman/listinfo/users<http://lists.xwiki.org/mailman/listinfo/users>
Hi Sergiu, one more finding is that when i try to get the last parameter it appends *?xpage=xpart in* in the last. For example:- if attach the parameter with code snippet *context.setLinksQueryString(myuser=GenericUser"**);* and i get it with * req.getParameter("myuser"**); *i get the value as *GenericUser?xpage=xpart* ** *similarly if there are two paramters it is appending the ?xpage=xpart at last of second paramter* ** I am not sure whether it can be the reasong for rendering the page twice ---------- Forwarded message ---------- From: mohit gupta <[email protected]> Date: Wed, Feb 8, 2012 at 11:47 AM Subject: Re: [xwiki-users] Modify velocity macro to send the name value paair as part of wiki URL? To: XWiki Users <[email protected]> Thanks a lot Sergiu. I was looking eaxactly for same . But it introduced another issue, whenever i come on welcome page of wiki after login i see welcome page rendered twice(even other pages too ). Here is code snippet which i introduced context.setLinksQueryString(USER_NAME+"="+UserId+"&"+WIKI_TYPE+"="+wikiType+"&dummyPar=dummy"); If i comment above line , it works fine and renders only only once. Any input on how above code snippet making the page rending twice? On Tue, Feb 7, 2012 at 12:43 PM, Sergiu Dumitriu <[email protected]> wrote:
On 02/07/2012 12:44 AM, mohit gupta wrote:
As i said in my original post i do not want to set it in session. Reason being is, i am opening two diffeernt wiki popup from parent window in amy application. So if i set any thing in session in one pop up window its also visible in another popup window which i dont want.
Here is the starting of problem
i set different request paramter for two wiki pop ups. when i click these two different links for two different pop ups, i see these parameters specific to each popup and i set them as attributes in request. but on further activity on these pop ups i do not get these parameters which i desperately need(probably xwiki code is using sendredirect though not sure). i can not set them in session because if i set them they are visible to both pop ups as session is same and i do not have identifier where i can identify which session attribute is for which request as class MyAuthServiceImpl is same. So i have to set them in request specific to pop ups.
You're confusing the term "request" with something else. A request is just ONE request, an HTTP GET requested by the client and answered by the server. "Further activity" means other requests.
Still, there might be something useful for you, thanks to the awesomeness of XWiki:
maven.xwiki.org/site/xwiki-**core-parent/xwiki-core/** apidocs/com/xpn/xwiki/**XWikiContext.html#**setLinksQueryString(java.lang. **String)<http://maven.xwiki.org/site/xwiki-core-parent/xwiki-core/apidocs/com/xpn/xwiki/XWikiContext.html#setLinksQueryString(java.lang.String)>
You'd use it like this:
xwikiContext.**setLinksQueryString("**customerType=permanent");
This isn't an add* method, so you have to set all the parameters that you need in one call, like: xwikiContext.**setLinksQueryString("**customerType=permanent&** customerName=ACME&otherParam=**some%20value");
Don't forget to URL-encode the values you put in the URL.
What this does is that all future calls to the various getURL methods, like XWikiDocument.getURL or XWiki.getURL will automatically append this string to the query string of the returned URL. If you didn't hard-code any URLs in the interface, then they should keep transmitting these parameters for every subsequent request.
This should be called very early in the request processing lifecycle, since it only affects the getURL calls that come after it, and it won't modify the URLs already generated.
i am not getting how to get rid of this issue.
On Tue, Feb 7, 2012 at 3:15 AM, Sergiu Dumitriu<[email protected]> wrote:
On 02/06/2012 11:28 AM, mohit gupta wrote:
i am using xwiki as wiki website for my banking application. i provided
a link AppHelp on my application web page. I click this link and it takes me to xwiki application hosted on another tomcat instance.So i get in to MyAuthServiceImpl as i have given the value of xwiki.authentication.****authclass=com.xpn.xwiki.user.****
impl.xwiki.MyAuthServiceImpl in xwiki.cfg. Inside this class i set xwikiContext.getRequest().****getHttpServletRequest().** setAttrrbute("customerType","****permanent")
and see my wiki welcome page. But now if i do any activity like click on link anywhere on wiki wapplication,i dont get the value of xwikiContext.getRequest().****getHttpServletRequest().**
getAttrrbute("customerType"). I am sure there must be some way i can configure it from admin user credentials probably in velocity macros and send it as part of request every time.
I need it as part of request only not in session.
You're setting the attribute on the request context, which is only valid for the current *request*, not for an entire session. You should use something like:
xwikiContext.getRequest().****getSession().setAttribute(****name, value)
-- Sergiu Dumitriu http://purl.org/net/sergiu/ ______________________________**_________________ users mailing list [email protected] http://lists.xwiki.org/**mailman/listinfo/users<http://lists.xwiki.org/mailman/listinfo/users>
Hi Sergiu, Here is detailed finding. Here is the parameter map in request that get formed without code snippet(context.setLinksQueryString) *{vm=[Ljava.lang.String;@19a88a, xpage=[Ljava.lang.String;@882622} *where xpage value is xpart Here is the parameter map in request that get formed after putting code snippet *context.setLinksQueryString("user=genericUser");* *{vm=[Ljava.lang.String;@d889b5, user=[Ljava.lang.String;@38eb55 *where vm value is commentsinline.vm and *user value is genericUser?xpage=xpart* And here is the analysis . After putting code snippet, instead of appending parameter for xpage with *&* it is appending it with *?.* Thats why parametermap is not having the xpage parameter instead it is having it appended with ? in last parameter). * Also analysed why it is happening .* The reason is in xwiki.js , i found below code window.docgeturl + '?xpage=xpart&vm=' + extraTemplate. After putting suggested code snippet(context.setLinksQueryString), it is appending '?xpage=xpart&vm=' + extraTemplate' in end of last parameter . Before putting suggested code snippet , window.docgeturl is empty and '?xpage=xpart&vm=' is appendid correctly and paramter map is constructed perfectly So even after doing this complete analysis, looks like this(context.setLinksQueryString)) has some issue but not getting how can i get rid of it ? I am sure there will be some way to get out of this. On Wed, Feb 8, 2012 at 1:03 PM, mohit gupta <[email protected]> wrote:
Hi Sergiu,
one more finding is that when i try to get the last parameter it appends *?xpage=xpart in* in the last. For example:-
if attach the parameter with code snippet *context.setLinksQueryString(myuser=GenericUser"**);* and i get it with * req.getParameter("myuser"**); *i get the value as *GenericUser?xpage=xpart * ** *similarly if there are two paramters it is appending the ?xpage=xpart at last of second paramter* ** I am not sure whether it can be the reasong for rendering the page twice
---------- Forwarded message ---------- From: mohit gupta <[email protected]> Date: Wed, Feb 8, 2012 at 11:47 AM Subject: Re: [xwiki-users] Modify velocity macro to send the name value paair as part of wiki URL? To: XWiki Users <[email protected]>
Thanks a lot Sergiu. I was looking eaxactly for same . But it introduced another issue, whenever i come on welcome page of wiki after login i see welcome page rendered twice(even other pages too ). Here is code snippet which i introduced
context.setLinksQueryString(USER_NAME+"="+UserId+"&"+WIKI_TYPE+"="+wikiType+"&dummyPar=dummy");
If i comment above line , it works fine and renders only only once. Any input on how above code snippet making the page rending twice?
On Tue, Feb 7, 2012 at 12:43 PM, Sergiu Dumitriu <[email protected]> wrote:
On 02/07/2012 12:44 AM, mohit gupta wrote:
As i said in my original post i do not want to set it in session. Reason being is, i am opening two diffeernt wiki popup from parent window in amy application. So if i set any thing in session in one pop up window its also visible in another popup window which i dont want.
Here is the starting of problem
i set different request paramter for two wiki pop ups. when i click these two different links for two different pop ups, i see these parameters specific to each popup and i set them as attributes in request. but on further activity on these pop ups i do not get these parameters which i desperately need(probably xwiki code is using sendredirect though not sure). i can not set them in session because if i set them they are visible to both pop ups as session is same and i do not have identifier where i can identify which session attribute is for which request as class MyAuthServiceImpl is same. So i have to set them in request specific to pop ups.
You're confusing the term "request" with something else. A request is just ONE request, an HTTP GET requested by the client and answered by the server. "Further activity" means other requests.
Still, there might be something useful for you, thanks to the awesomeness of XWiki:
maven.xwiki.org/site/xwiki-**core-parent/xwiki-core/** apidocs/com/xpn/xwiki/**XWikiContext.html#** setLinksQueryString(java.lang.**String)<http://maven.xwiki.org/site/xwiki-core-parent/xwiki-core/apidocs/com/xpn/xwiki/XWikiContext.html#setLinksQueryString(java.lang.String)>
You'd use it like this:
xwikiContext.**setLinksQueryString("**customerType=permanent");
This isn't an add* method, so you have to set all the parameters that you need in one call, like: xwikiContext.**setLinksQueryString("**customerType=permanent&** customerName=ACME&otherParam=**some%20value");
Don't forget to URL-encode the values you put in the URL.
What this does is that all future calls to the various getURL methods, like XWikiDocument.getURL or XWiki.getURL will automatically append this string to the query string of the returned URL. If you didn't hard-code any URLs in the interface, then they should keep transmitting these parameters for every subsequent request.
This should be called very early in the request processing lifecycle, since it only affects the getURL calls that come after it, and it won't modify the URLs already generated.
i am not getting how to get rid of this issue.
On Tue, Feb 7, 2012 at 3:15 AM, Sergiu Dumitriu<[email protected]> wrote:
On 02/06/2012 11:28 AM, mohit gupta wrote:
i am using xwiki as wiki website for my banking application. i
provided a link AppHelp on my application web page. I click this link and it takes me to xwiki application hosted on another tomcat instance.So i get in to MyAuthServiceImpl as i have given the value of xwiki.authentication.****authclass=com.xpn.xwiki.user.****
impl.xwiki.MyAuthServiceImpl in xwiki.cfg. Inside this class i set xwikiContext.getRequest().****getHttpServletRequest().** setAttrrbute("customerType","****permanent")
and see my wiki welcome page. But now if i do any activity like click on link anywhere on wiki wapplication,i dont get the value of xwikiContext.getRequest().****getHttpServletRequest().**
getAttrrbute("customerType"). I am sure there must be some way i can configure it from admin user credentials probably in velocity macros and send it as part of request every time.
I need it as part of request only not in session.
You're setting the attribute on the request context, which is only valid for the current *request*, not for an entire session. You should use something like:
xwikiContext.getRequest().****getSession().setAttribute(****name, value)
-- Sergiu Dumitriu http://purl.org/net/sergiu/ ______________________________**_________________ users mailing list [email protected] http://lists.xwiki.org/**mailman/listinfo/users<http://lists.xwiki.org/mailman/listinfo/users>
participants (3)
-
mohit gupta -
Paul Libbrecht -
Sergiu Dumitriu