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
SCJP, SCJD, SCWCD.
Rodrigo W Bonatto
Ranch Hand
Joined: Aug 20, 2004
Posts: 62
posted
0
Hi,
What's your page extension .html or .jsp?
Rodrigo [ January 18, 2005: Message edited by: Rodrigo W Bonatto ]
SCJA, SCJP, SCJD, SCWCD, SCBCD5, SCDJWS, SCEA5
Steven Hoodless
Ranch Hand
Joined: Mar 23, 2004
Posts: 64
posted
0
The file is called resultJB.jsp
Thanks for asking.
Steven
Ritu varada
Ranch Hand
Joined: Sep 08, 2004
Posts: 117
posted
0
I am facing the same problem. I thought EL was enabled by default. Still, I added this in the web.xml file
and I put this page directive in the jsp file <%@ page isELIgnored="false" %>
Net result : Its still NOT WORKING!
What are we missing ?
SCJP,SCWCD(1.4)
Fletcher Estes
Ranch Hand
Joined: Jul 01, 2004
Posts: 108
posted
0
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
Joined: Jan 05, 2005
Posts: 13
posted
0
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
Joined: Mar 23, 2004
Posts: 64
posted
0
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
Joined: May 16, 2004
Posts: 102
posted
0
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
Joined: Oct 20, 2003
Posts: 99
posted
0
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.
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.