[英]spring mvc not working on cloudfoundry
I have an application developted with spring-mvc. 我有一个用spring-mvc开发的应用程序。 And I deploy the application to cloudfoundry.
然后将应用程序部署到cloudfoundry。
Everything is alright in my local, but on cloudfoundry session objects is not rendered successfully. 在我本地,一切正常,但是在cloudfoundry会话上,对象未成功呈现。
this is my application 这是我的申请
http://jelibo.final.cloudfoundry.com/ http://jelibo.final.cloudfoundry.com/
login credentials are : test / test 登录凭据是:测试/测试
after login fallow "Hesabım" link on left menu. 登录后,在左侧菜单上单击“Hesabım”链接。
I am trying to deploy my application both with the eclipse plugin and "mvn clean verify cf:update cf:restart" 我正在尝试使用eclipse插件和“ mvn clean verify cf:update cf:restart”部署我的应用程序
Thanks. 谢谢。
Seems that you have a space inside your expressions. 表达式内部似乎有空格。 When I look at your source I see the following:
当我查看您的来源时,会看到以下内容:
<font color="#777" style="font-size: 30px; font-weight: bold;">${merc.merchantName }</font>
As you can see there is a space at the end of ${merc.merchantName }
如您所见,
${merc.merchantName }
末尾有一个空格
Try removing the space and have it as ${merc.merchantName}
and see if then works. 尝试删除该空格并将其作为
${merc.merchantName}
,然后查看是否可以使用。
Make sure you are using org.springframework.web.servlet.ModelAndView;
确保您正在使用
org.springframework.web.servlet.ModelAndView;
Some times import org.springframework.web.portlet.ModelAndView;
有时会
import org.springframework.web.portlet.ModelAndView;
gets auto imported by the IDE. 由IDE自动导入。
The problem is about this discusssion 问题是关于这次讨论
Spring MVC: ModelAndView objects are not getting carried to the view Spring MVC:ModelAndView对象不会携带到视图中
My local is tomcat7; 我的本地人是tomcat7; but cloudfoundy works on tomcat6.
但是cloudfoundy在tomcat6上工作。 So the web.xml version must be version2.4 specification.
因此,web.xml版本必须为version2.4规范。
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web- app_2_4.xsd"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.