Cant use JSTL ${data}

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • aliceodds
    replied
    Thanks man you have just saved my life!

    Leave a comment:


  • CelticMonkey
    replied
    Fixed

    After some digging around, I've found a fix; it was caused by tomcat version differences. Hopefully this may be usefull to others too.

    I'm guessing this a subtle config issue
    I've modified the servlet version in my web.xml to;
    Code:
    <web-app version="2.4" 
    ....
    and everything works fine now!

    Leave a comment:


  • CelticMonkey
    started a topic Cant use JSTL ${data}

    Cant use JSTL ${data}

    Hi guys,
    I'm having a few teething problems with getting my java applications up and running. Tech support has ironed out problems with war file auto deployment which is now working a charm.
    My problem is that I can't seem to use JSTL data markup - ${variableName} - Tomcat simply refuses to process them as data. As a simple example, my redirect page looks like this;

    Code:
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    ....
    ....
    <c:set var="home"><c:url value="contacts.xhtm"/></c:set>
    <c:redirect url="${home}" />
    But the server redirects to the unprocessed value; /contextPath/${home} (clearly - does not exist)
    rather than /contextPath/contacts.xhtm.
    On both my development and test servers (both Tomcat 6), I am correctly forwarded to
    /contextPath/contacts.xhtm

    Whereas this is an easy one to work around by replacing the literal value, the behaviour seems to be repeated throughout all pages; I will post more code if needed but the above fragment gets it in a nut-shell.
    I'm guessing this a subtle config issue, I have both jstl.jar and standard.jar libraries in WEB-INF/lib/ but guess (and hope) I'm probably missing something really obvoius.

    Many thanks in advance for any advice
Working...
X