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 .