jsp - Spring MVC 3 JSTL will not output values in Tomcat 5.5 -


I'm having difficulty showing the model value in my JSP view with my controller, everything works in Tomcat. But it does not work in Tomcat 5.5. Tomcat 5.5 (For Tomcat 6, I use version = "2.5" and correct schema)

 

web.xml < / Strong> Code> & lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Web-app xmlns = "http://java.sun.com/xml/ns/j2ee" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" XSI: Schema location = "Http : //java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd "version =" 2.4 "& gt;

strong>: jstl.jar, standard.jar (version 1.1)

Controller

  @Controller @RequestMapping ("/ inventory") Public Class Simple Controller {@Autowired @Qualifier ("inventory service") private INNT Service service list service; // Our default method is when a simple GET request / simple @SuppressWarnings ("uncheck") @RequestMapping (method = RequestMethod.GET) public string view products (modelmap model) {list & lt; IInventory & gt; Recover = invention service. List & lt; Inventory DTO & gt; Inventions = new Arrivits (); (IInventory inventory: recover) {inventory DTO inventory DTO = new inventory DTO (); InventoryDTO.setId (inventory.getId ()); InventoryDTO.setBrandName (inventory.getBrand () getName ().); Inventories.add (inventoryDTO); } Model.put ("inventory", inventory); // This will solve the name of a logical approach /WEB-INF/jsp/inventoriesView.jsp return "inventoriesView"; }}  

inventoriesView.jsp

  & lt;% @ taglib prefix = "c" uri = "http: / / / Java.sun.com/jsp/jstl/core "%> & Lt;% @ taglib uri = "http://www.springframework.org/tags/form" prefix = "form"% & gt; & Lt;% @ taglib uri = "http://www.springframework.org/tags" prefix = "spring"%> & Lt; Html & gt; & Lt; Top & gt; & Lt; Style type = "text / css" & gt; & Lt;% @ included file = "../../provisation/style.css"%> & Lt; / Style & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = UTF-8" /> & Lt; Title & gt; List & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; H1 & gt; Inventory & lt; / H1> & Lt; Br / & gt; & Lt;% @ include file = "menu.jsp"% & gt; & Lt; Br / & gt; & Lt; Br / & gt; & Lt; C: If test = "$ {! Empty inventory}" & gt; & Lt; Table class = "table" range = "1" & gt; & Lt; TR & gt; & Lt; Th & gt; Id & lt; / Th & gt; & Lt; Th & gt; Brand & lt; / Th & gt; & Lt; / TR & gt; & Lt; C: forEach item = "$ {inventories}" var = "inventory" & gt; & Lt; TR & gt; & Lt; Td> & Lt; C: out value = "$ {inventory.id}" /> gt; & Lt; / Td> & Lt; Td> & Lt; C: Out value = "$ {inventory.brandName}" /> gt; & Lt; / Td> & Lt; / TR & gt; & Lt; / C: foreach & gt; & Lt; / Table & gt; & Lt; / C: If & gt; & Lt; C: If test = "$ {empty inventory}" & gt; There is currently no list & lt; / C: If & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

This work works flawlessly in Tomcat 6.0, but not in Tomek 5.5. I did not find any errors, will not display data such as model null When I call EL expression {2 + 2} then I get 4 as the value for Toket 5.5 and 6. Thank you

I assume that you have your / WEB-INF / lib In Tomcat 6, there is a specific EL JAR file, which can cause others to lose EL-EL code in Tomcat 5.5 ELT empty make sure your / WEB-INF / lib < / Code> Servlet is free from container-specific libraries I also check Tomek 5.5 logs for any failure during startup and webapp initialization. They will not represent per web page in error page.


Comments