• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EL

 
KRK Gowda
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
i am using Tomcat web server 5.X. i am coding EL in my jsp, but when the jsp is run, browser is displaying EL as it is in jsp
ex : ${request.name} will be displayed as ${request.name} itself.
any solutions please.

Thanks in Advance.
 
Manish Shah
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Use JSTL Standard tag library to get the result.

Include jstl.jar and standard.jar in WEB-INF/lib folder.

Also in your jsp file do not forget to add the taglib directive
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>

This will solve your problem.
 
Imran Vohra
Ranch Hand
Posts: 77
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can point two things to check.
Check in web.xml or page directive and make sure that you have not disabled EL explicitly.

And second thing in EL
implicit object is not request. its requestScope
if you want to access request properties then access it through pageContextlike ${pageContext.request.requestURI}

Regards
Imran
 
Puja Verma
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I too got same type of problem and it got resolved by specifying the version as 2.4.
You can check by specifying version as 2.4
e.g

<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 web-app_2_4.xsd" id="WebApp" version="2.4">



thanks,
Pooja
--------------------
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic