I am having difficulty in getting Tomcat to understand JSTL tags and the JSP
Expression Language.

As a result ${expression} is just displayed as is on the web page and not
the result of evaluating the expression.

 

Setting variables using JSTL tags also does not work.

 

In Manager.java class I have

 

private String userType;

private String userId;

 

public String getUserId() {

     return userId;

    }

public void setUserId(String userId) {

        this.userId = userId;

    }

public String getUserType() {

        return userType;

    }

public void setUserType(String userType) {

        this.userType = userType;

    }

 

In Manager.jsp I have:

<jsp:useBean id="lmdao"

    class="listings.Data.Manager"   

    scope="request" />

 

Using JSTL the properties should be set using

<c:set target='${lmdao}' property='userId' value="12345"'></c:set>   

<c:set target='${lmdao}' property='userType' value='"Senior">

 

This works in Glassfish but Tomcat 5.5.25 seems unable to to read JSTL tags
and gives this exception

exception 

org.apache.jasper.JasperException: Invalid property in &lt;set&gt;:
"userId"
 
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWra
pper.java:460)
 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
55)
 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

. 

I have standard.jar and jstl.jar files in C:\apache-tomcat-5.5.25\common\lib

 

Can anyone see what I need to do to get JSTL running in Tomcat?

 

John.

Reply via email to