Reputation: 11
I wrote a web application with Eclipse Tomcat and it works on my local Tomcat 7, when I tried to publish it online on a Tomcat 7, I am getting value of EL in JSTL tag value as null. I have included jstl-1.1.2.jar and standard.jar inside /WEB-INF/lib on the production server. Directive for including jstl is standard:
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
Also I have declared the specs in web.xml as below.
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app version="2.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">
Also I am not getting any kind of exception/error in this.
Below is code snippet for the same
<c:if test='${not empty UserProfileInfo}'>
<p>Hello</p>
</c:if>
Every time UserProfileInfo is getting as null. This is problem is only happening in case of production server as on my local machine it is working fine.
Upvotes: 0
Views: 2636
Reputation: 173
I faced similar issues. You can refer to the solution that I found for this problem at: https://stackoverflow.com/a/25374024/1443527
Upvotes: 1