简体   繁体   中英

spring mvc not working on cloudfoundry

I have an application developted with spring-mvc. And I deploy the application to cloudfoundry.

Everything is alright in my local, but on cloudfoundry session objects is not rendered successfully.

this is my application

http://jelibo.final.cloudfoundry.com/

login credentials are : test / test

after login fallow "Hesabım" link on left menu.

I am trying to deploy my application both with the eclipse plugin and "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 }

Try removing the space and have it as ${merc.merchantName} and see if then works.

Make sure you are using org.springframework.web.servlet.ModelAndView;

Some times import org.springframework.web.portlet.ModelAndView; gets auto imported by the IDE.

The problem is about this discusssion

Spring MVC: ModelAndView objects are not getting carried to the view

My local is tomcat7; but cloudfoundy works on tomcat6. So the web.xml version must be version2.4 specification.

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"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM