Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Atahar Khan
Ajax call in linux
April 22, 2013 9:47 PM
Answer

Atahar Khan

Rank: New Member

Posts: 17

Join Date: October 26, 2012

Recent Posts

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
Manish Yadav
RE: Ajax call in linux
April 22, 2013 10:33 PM
Answer

Manish Yadav

Rank: Expert

Posts: 479

Join Date: May 26, 2012

Recent Posts

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

1
2web.server.http.port=80
3web.server.https.port=-1
4web.server.host=http://localhost:8080
5web.server.protocol=http
6web.server.display.node=false
Atahar Khan
RE: Ajax call in linux
April 22, 2013 10:43 PM
Answer

Atahar Khan

Rank: New Member

Posts: 17

Join Date: October 26, 2012

Recent Posts

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
Manish Yadav
RE: Ajax call in linux
April 22, 2013 11:00 PM
Answer

Manish Yadav

Rank: Expert

Posts: 479

Join Date: May 26, 2012

Recent Posts

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
RE: Ajax call in linux
April 24, 2013 10:09 PM
Answer

Atahar Khan

Rank: New Member

Posts: 17

Join Date: October 26, 2012

Recent Posts

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
Manish Yadav
RE: Ajax call in linux
April 24, 2013 10:19 PM
Answer

Manish Yadav

Rank: Expert

Posts: 479

Join Date: May 26, 2012

Recent Posts

you can define this below property in portal-ext.properties and restart server.

1session.enable.url.with.session.id=false
Atahar Khan
RE: Ajax call in linux
April 24, 2013 10:30 PM
Answer

Atahar Khan

Rank: New Member

Posts: 17

Join Date: October 26, 2012

Recent Posts

how can i use session.enable.url.with.session.id=false only for particular portlet, not for whole server instance