This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes JSTL choose example Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "JSTL choose example" Watch "JSTL choose example" New topic

JSTL choose example

Vani Chinta
Ranch Hand

Joined: Mar 25, 2007
Posts: 38
I am displaying results based on user selection(pg 444 of HFSJ).
Expected: when I select performance, "Now you can stop even if you drive insanely." should be displayed.
Output: always <c therwise> is getting printed.
Here is the JSP.

expression request.getParameter("userSelection") is displaying the chosen option.

I tried specifically declaring el-ignored tag in web.xml to be false. Can any one let me know what is going wrong here.


SCJP 1.4
Christophe Verré

Joined: Nov 24, 2005
Posts: 14687

userSelection is a request parameter, so you have to use the implicit object called "param" to access it :

[My Blog]
All roads lead to JavaRanch
Vani Chinta
Ranch Hand

Joined: Mar 25, 2007
Posts: 38
Thanks for a quick response.
It is sorta covered in the JavaRanch Style Guide.
subject: JSTL choose example
Similar Threads
jstl problems
error in jstl while writing c:if
The end tag "&lt;/c:choose" is unbalanced
retrive from table
simple JSTL problem