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
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: 14688

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.
I agree. Here's the link:
subject: JSTL choose example
It's not a secret anymore!