Fórumok

Ajax call in linux

Atahar Khan, módosítva 11 év-val korábban

Ajax call in linux

New Member Bejegyzések: 17 Csatlakozás dátuma: 2012.10.26. Legújabb bejegyzések
Hi,
I have three lists which are depended on each other, i.e, 2nd list is depended on first and 3rd is depended on 2nd , now when i run this portlet on windows(my machine) it is running ok, but when i run my portlet on linux , 2nd list is not coming first time, 2nd list is appearing when i refresh the page,

i make a ajax call onChange of first list.


<%
PortletURL loadRLBsTypeAndDepartmentURL = renderResponse.createActionURL();
loadRLBsTypeAndDepartmentURL.setParameter(ActionRequest.ACTION_NAME, "loadRLBsTypeAndDepartment");
%>
var url = "<portlet:actionURL><portlet:param name="redirect" value="<%= loadRLBsTypeAndDepartmentURL.toString() %>" /><portlet:param name="" value="" /></portlet:actionURL>";
url +="&getRlb="+getRlb+"&level="+level+"&localBodyIdVisit="+localBodyIdVisit+"&stateId="+stateId+"&cmd=loadRLBsTypeAndDepartment";
var tierSetupSize = document.getElementById('tierSetupSize');

<portlet:namespace/>callAjaxVisit(url);

Please guide

Thanks
thumbnail
Manish Yadav, módosítva 11 év-val korábban

RE: Ajax call in linux

Expert Bejegyzések: 493 Csatlakozás dátuma: 2012.05.26. Legújabb bejegyzések
Ajax call is not depending upon operating system.
Check below points might be they will help you

1. Check what response code you are getting from server[Use firebug ]
2. Are you using Apache web server before your liferay application server. if yes then set below properties in portal-ext.properties


web.server.http.port=80
web.server.https.port=-1
web.server.host=http://localhost:8080
web.server.protocol=http
web.server.display.node=false
Atahar Khan, módosítva 11 év-val korábban

RE: Ajax call in linux

New Member Bejegyzések: 17 Csatlakozás dátuma: 2012.10.26. Legújabb bejegyzések
Thanx for the reply,
This is my custom portlet, can i place this "portal-ext.properties" in src folder, and liferay with get this value directly,


web.server.http.port=80
web.server.https.port=-1
web.server.host=http://localhost:8080
web.server.protocol=http
web.server.display.node=false
thumbnail
Manish Yadav, módosítva 11 év-val korábban

RE: Ajax call in linux

Expert Bejegyzések: 493 Csatlakozás dátuma: 2012.05.26. Legújabb bejegyzések
You have to copy above properties in portal-ext.properties only If you are using web server otherwise not...

path or porta-ext.properties

<liferay-home>/tomcat/webapps/WEB-INF/classes/ <create file if not present ,with name of portal-ext.properties >

1. First check response code from developer tool...what response code you are getting from server. 200 or something else??
2. Are you are using same browser in both machines....
Atahar Khan, módosítva 11 év-val korábban

RE: Ajax call in linux

New Member Bejegyzések: 17 Csatlakozás dátuma: 2012.10.26. Legújabb bejegyzések
Thanx,

I have problem with jsessionid, on first hit jsessionid is appended in url , when i refresh it it is removed, i got to know to that if i write session.enable.url.with.session.id=false in setup wizard, jsessionid will be removed, is it a safe move,

this is my custom portlet , how can i write
session.enable.url.with.session.id=false only for particular portlet
thumbnail
Manish Yadav, módosítva 11 év-val korábban

RE: Ajax call in linux

Expert Bejegyzések: 493 Csatlakozás dátuma: 2012.05.26. Legújabb bejegyzések
you can define this below property in portal-ext.properties and restart server.

session.enable.url.with.session.id=false
Atahar Khan, módosítva 11 év-val korábban

RE: Ajax call in linux

New Member Bejegyzések: 17 Csatlakozás dátuma: 2012.10.26. Legújabb bejegyzések
how can i use session.enable.url.with.session.id=false only for particular portlet, not for whole server instance