aspose file tools
The moose likes JSP and the fly likes EL not being evaluated inspite of Deployment Descriptor version 2.4 and tomcat version 5.5 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "EL not being evaluated inspite of Deployment Descriptor version 2.4 and tomcat version 5.5" Watch "EL not being evaluated inspite of Deployment Descriptor version 2.4 and tomcat version 5.5" New topic
Author

EL not being evaluated inspite of Deployment Descriptor version 2.4 and tomcat version 5.5

nidhivel raja
Ranch Hand

Joined: Jun 26, 2008
Posts: 36
Hi all
I am reading Head First Servlets 2nd edition,In the JSP elements topic(chapter 7) there's a table that displays the status of EL evaluation(page 327).From the details given i understand,that if both the DD configuration and Page directive are unspeciifed for EL evaluation then El expresions will be evaluated.

I created a simple web application from the same book, where i have specified the version of web.xml as 2.4(My Tomcat version is 5.5) but still the El is not being evaluated
Following is my web.xml




My form.html
<html>
<h1 align="center">Beer Selection Page</h1>
<form method="POST" action="SelectBeer.do">
Select beer characterstics


Color:
<select name="color" size="1">
<option value="light">light</option>
<option value="amber">amber</option>
<option value="brown">brown</option>
<option value="dark">dark</option>
</select>



<center>
<input type="SUBMIT">
</center>
</form></body>
</html>



My Servlet BeerSelect.java



Finally my result.JSP

<html>
<h1 align="center">Result Page</h1>


Color of life as follows:
${requestScope.coloroflife} is yours!!!




<center>
<input type="SUBMIT">
</center>
</form></body>
</html>



When the user selects the beer choice and submits the form ,the selected result is forwarded to the result jsp with the attribute in requestScope.
Inspite of version of the DD 2.4 my EL is not being evaluated,I dont know the reason for this, Given the condition that both the page directive and DD configuration are unspecified,as per the book the El should be evaluated.Can anyone please help me in this issue.? Thank you in advance

ps:I browsed through other topics in the same forum regarding this problem ,and found that such problems arise due to version mismatches,but in my case i think i have already set my version as 2.4 .

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56185
    
  13

Rather than the complicated code, create a JSP that contains nothing but: ${3+4}

Does it display 7 or the source?


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
nidhivel raja
Ranch Hand

Joined: Jun 26, 2008
Posts: 36
Hi Bear,

Thanks for your reply.i did as you advised i restarted my server as well as PC,I even cleared my cache in the browser.Now i am able to get the desired output as 7!!! :D

I think the earlier problem occured because of cache pages in the browser,anyways thankx a lot Bear:D
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: EL not being evaluated inspite of Deployment Descriptor version 2.4 and tomcat version 5.5
 
Similar Threads
Getting problem with post method
MVC tutorial Head First
Starting out on Servlets - from Head First Servlets and JSP
Servlet call JSP
how to set class path