File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EL Hell

 
Steven Hoodless
Ranch Hand
Posts: 64
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need help with EL. Two days of fiddling around and reading up on Tomcat and my EL expressions still aren't working. Am I missing something very obvious?

I have Tomcat 5.0.28 and have not chosen to ignore EL in the directive or the DD. My jsp contains the following:-



and I get the following result on my web page:



The expressions are not evaluated. Not even the simple ${8*8} or ${true and false}.

Would apreciate any help to move on from this sticking point.

Thanks.

Steven
 
Rodrigo W Bonatto
Ranch Hand
Posts: 62
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

What's your page extension .html or .jsp?

Rodrigo
[ January 18, 2005: Message edited by: Rodrigo W Bonatto ]
 
Steven Hoodless
Ranch Hand
Posts: 64
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The file is called resultJB.jsp

Thanks for asking.

Steven
 
Ritu varada
Ranch Hand
Posts: 117
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am facing the same problem. I thought EL was enabled by default. Still, I added this in the web.xml file

<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<el-ignored>false</el-ignored>
</jsp-property-group>


and I put this page directive in the jsp file
<%@ page isELIgnored="false" %>

Net result : Its still NOT WORKING!

What are we missing ?
 
Fletcher Estes
Ranch Hand
Posts: 108
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Steven, can you post your entire web.xml and JSP file? Also, are you sure your JSP is being loaded by Tomcat as a servlet - there should be a log message confirming this when you start the server.
 
Naresh Arige
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Run the JSP 2.0 EL examples provided by Tomcat, if it runs fine then compare the web.xml file of jsp-examples/WEB-INF/web.xml with your work web.xml file.
Compare the .dtd/.xsd schema location paths in the web.xml and it could be different in your web.xml.
 
Steven Hoodless
Ranch Hand
Posts: 64
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fletcher/Naresh,

Thank you both for the help. Naresh made a good point. The EL examples that come with Tomcat are working. I will investigate differences between them and mine.

Thanks,

Steven
 
subu ananthram
Ranch Hand
Posts: 102
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey guys did you figure out how to get the values using
${param.name}

I am having some problems with it and just came across this thread
anyhelp is appreciated
 
Durgaprasad Guduguntla
Ranch Hand
Posts: 99
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure that you are using correct web.xml in your web application. The best way to do is to use web.xml shipped with Tomcat examples. The head should be like this.
 
Steven Hoodless
Ranch Hand
Posts: 64
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Subu,

Most importantly check that the example JSPs are working in Tomcat as Naresh suggested. If they are then you know the problem is in your source code for the jsp.

Then compare the example source with your own. You will probably find a missing bracket or some such bug in your code.

Best of luck,

Steven
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic