JSTL with Struts

I need to display an update screen of User instance. In the action a sotre the user in request:

request.setAttribute("user", user);

I forward to a jsp

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

....

<html:form action="/usecase/manageUser/update.do" method="POST" ...>

...

<html:text property="firstName" value="${user.firstName}"/>

...

</html:form>

But in the browser I have "${user.firstName}" displayed in spite of the real first name.

Any idean ?

[564 byte] By [3ninbaa] at [2007-11-27 5:48:28]
# 1

Well there are two possible answers here.

1 - You are using a JSP1.2(eg Tomcat 4) container which doesn't understand EL

2 - You are using a JSP2.0(eg Tomcat 5) container but EL evaluation is disabled

As a quick fix, try putting this on your page

<%@ page isELIgnored="false" %>

If that fixes it, see this post for full details on how to configure JSTL:

http://forum.java.sun.com/thread.jspa?threadID=629437&tstart=0

If it doesn't work, then you have a JSP1.2 container, and if you want to use EL with the Struts tags, you have to use the specific struts-el version of the taglibrary.

evnafetsa at 2007-7-12 15:33:59 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...