PDA

View Full Version : MVC with spring problem



leon.wood
14 Nov 2012, 4:40 AM
Hi,
I write a user management with extjs4.1.1 and spring3 mvc
and my extjs dir like pic 1;
when i click login from index.html will request login/login.html
and return test.jsp
but the ext loader will add "login" in url
if I visit test.jsp direct there is no problem
I can't find where is wrong?anyone could help me?thanks

pic 1
40030
pic 2

40031

pic 3
40032
pic 4
40033

tvanzoelen
14 Nov 2012, 4:49 AM
Try to set the namespace of you application in the Loader


Ext.Loader.setPath('app', '..');

leon.wood
16 Nov 2012, 6:30 PM
I tried this,but it not work.....:-|

leon.wood
16 Nov 2012, 7:28 PM
I set "appFolder:'/projectName/app'" it can be work,but how to make it work without add projectName ?

rrandymeyer
20 Nov 2012, 11:55 AM
Hi Leon,

I attached a zip with my setup, hope this helps you.

jitesh_biswal
14 Feb 2013, 8:54 AM
How did you solve this problem. I am currently working on web desktop of extjs 4.1.1 with below code using spring 3


Ext.Loader.setPath({
'Ext.ux.desktop': './js/extjs4.1.1a/desktop/js/',
MyDesktop: ''
});

Ext.require('MyDesktop.App');

var myDesktopApp;
Ext.onReady(function () {
myDesktopApp = new MyDesktop.App();
});
I am getting error

WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/SSPA/desktop/App.js] in DispatcherServlet with name 'appServlet'
WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/SSPA/images/powered-by-ext-js.png] in DispatcherServlet with name 'appServlet'

<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/scripts/extjs4.1.1a/resources/css/ext-all.css" />
<script type="text/javascript" src="${pageContext.request.contextPath}/scripts/extjs4.1.1a/ext-all-debug.js"></script>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/styles/desktop.css">


Any idea, how can the Ext.Loader.setPath can get proper path of web desktop js and css files?