PDA

View Full Version : Servlet call not happen inside the store



swiji2000
23 Jan 2013, 3:10 AM
Hi,

I am creating one new store inside the controller. here i am calling one servlet, but its not working.

Please help me to solve this issue.

here is my code

var gridStore = new Ext.data.Store({
storeId: 'viewGridStore',
model:model,
fields: this.storeFields,
disableCaching : false,
autoLoad: true,
proxy: {
type: 'ajax',
url: '/mypath/myServlet',
extraParams: {
asession: sessionId,
buid: buId,
filePath: value,
action:'validateQuery'
},
reader: {
type: 'xml',
record:'row'
}
}
});


Thanks in advance

friend
23 Jan 2013, 10:33 AM
Try removing the leading forward slash from your URL. This is forcing the path to be root relative instead of context relative.

swiji2000
24 Jan 2013, 3:31 AM
Hi Friend,

Thanks for your guidance. But its not working. i am getting "Failed to load resource" error in my browser.

Kindly help me to solve this issue.

friend
24 Jan 2013, 5:29 AM
Can you directly invoke the Servlet from the address bar in your browser and get an expected result?

swiji2000
24 Jan 2013, 10:12 PM
Hi,

I solved that issue.
The param 'value' is too length and i send as GET method. i changed as POST, its working fine.

Thanks for ur help.