<% String ip = request.getRemoteAddr();
ip = ip.replaceAll("\\.","-");
%>
Que j'appel dans site index.jsp de share je l'envoi ensuite via Get pour utiliser un webscript pour attribué l'ip au user
response.sendRedirect(request.getContextPath() + "/page/user/" + URLEncoder.encode(userid) + "/dashboard?value="+ip);
<script type="text/javascript">
function extractUrlParams(){
var t = location.search.substring(1).split('&');
var f = [];
for (var i=0; i<t.length; i++){
var x = t[ i ].split('=');
f[x[0]]=x[1];
}
return f;
}
window.addEvent('domready', function(event) {
var args = extractUrlParams();
var ip = args["value"];
new XHR({
method: 'get',
async: false
}).send('/alfresco/service/user/ip/'+ip,'');
});
</script>
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.