<c:out> problem In Struts


Web tier: servlets, JSP, Web frameworks: <c:out> problem In Struts

  1. <c:out> problem In Struts (3 messages)

    I am using Struts framework and can't seem to get JSTL core tags to work with it. For example, the JSP page

    <c:out value="${1+2+3}" />

    produces an output of ${1+2+3} instead of 6.

    I have tried this using the Jakarta struts blank application under netbeans and get the results above. If I use just a new web application from netbeans, I have no problems and the above statement works as expected. The jsp pages include:
    <%@ taglib uri="/tags/c" prefix="c" %>

    and the web.xml includes:

    Anybody know why this is a problem?

    Threaded Messages (3)

  2. Works for me![ Go to top ]

    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
    <%@ page contentType="text/html;charset=windows-1252"%>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>c:out test</title>
    <c:out value="${1+2+3}"/>
  3. Check web.xml for web-app tag[ Go to top ]

    Check for these things:
    #1.web-app tag in web.xml should be :

    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
  4. Check web.xml for web-app tag[ Go to top ]

    Gtreat ! Thanks Ravi.. I was facing the same problem. Changing web.xml per your suggestion solved my problem.