• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EL Hell

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The file is called resultJB.jsp

Thanks for asking.

Steven
 
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic