I have a variable ${bean.name} how can i pass it to a javascript var? I\'ve tried var name = \"${bean.name}\" and var name = ${bean.name}<
this doen't work either var name becomes the string "${bean.name}"
Make sure that you're running a Servlet 2.4 capable container and that web.xml is declared as Servlet 2.4 or higher.
This way EL will work in template text as well (without the need for JSTL ). It was namely introduced in Servlet 2.4 / JSP 2.0. Tomcat 5.5 is an example of a Servlet 2.4 container. If your container supports a higher servlet API version, e.g. 2.5 or 3.0, then you should declare the web.xml conform this version to benefit all newest features.
You'll then also be able to do the following in the JSP: