PDA

View Full Version : EL doesn't work


edge
May 20th, 2007, 06:27 AM
Hi,
I have to write long sentences of code like:

<input type="text" size="16" maxlength="30" name="<c:out value="${status.expression}"/>" value="<c:out value="${status.displayValue}"/>"/>

instead of:

<input type="text" size="16" maxlength="30" name="${status.expression}" value="${status.displayValue}"/>

because second option doesn't work properly. In the text field it displays text:

${status.displayValue}

What should I do to be able to use shorter version of this code?

Jörg Heinicke
May 20th, 2007, 06:37 AM
Does this recent thread (http://forum.springframework.org/showthread.php?t=38808) help?

Jörg

edge
May 20th, 2007, 08:56 AM
Yes, partly. I have combined several advices from forums.

I changed line in my jsp page from:

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

to:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

I changed <web-app> tag in web.xml file from:

<web-app>

to:

<web-app 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" version="2.4">

and finally I added another line to jsp page:

<%@ page isELIgnored="false"%>

Now it works :)