Using Ext-JS 4.1 with Spring 3.1 Controllers.
I am trying to retrieve an object from my Spring Controller using the load() method. I read a string from a text field and send that into the load method. The string field will contain a fully qualified server name such as "company.server.com". What's happening is that the value within the Spring controllers is "company.server", in other words it drops the ".com". It I put in an additional period at the end such as "company.server.com." then it comes in properly as "company.server.com". There seems to be some sort of tokenizing going on. I used commas (,) just to see what would happen. Using commas the string came in as expected. For some reason periods (.) is causing the issue.
Here is the Model:
Ext.define('AB.model.Server', {
extend: 'Ext.data.Model',
fields: [
{name:'serverName', type:'String'},
{name:'memory', type:'String'},
{name:'cpus', type:'int'}
],
proxy {
type: 'rest',
url: '/web/user/'
}
});
Here is a snippet from the form which makes the load() call:
Ext.define('AB.view.Form', {
extend: 'Ext.form.Panel',
....
,{
xtype: 'button',
text: 'Retrieve Information',
handler: function() {
Ext.ModelManager.getModel('AB.model.User').load(Ext.getCmp('serverName').getValue(), {
success: function(user) {
alert("Success");
}
....
}
Using Firebug I see this as the URL being called:
http://myServer/web/user/company.server.com?_dc=13461612333647?id=company.server.com
So the URL has the correct server name but on the Spring Controller side the value of my parameter is "company.server".
When I directly put the following URL directly in my web browser:
http://myServer/web/user/company.server.com/
it works properly with the parameter in the Spring Controller being "company.server.com".
Is this an EXT JS problem? Is a problem with EXT JS to Spring? I don't think it is a Spring issue alone since the URL directly in the browser works properly.
UPDATE:
When I put the following URL directly in my web browser:
http://myServer/web/user/company.server.com
it behaves the same as the EXT JS Rest call. Notice there is no ending slash (/). So maybe this is a Spring issue? Or maybe a web.xml issue?