• Post Reply Bookmark Topic Watch Topic
  • New Topic

requestScope implicit object

 
Gayatri Ganesh
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,

I am new to JSTL. I know of the requestScope implicit object.
How do we use it ?

In my query string I have http:localhost:8080/url?task=open
If i want to access task in my JSP should I be doing :

<c ut value="${requestScope.task}"/>

but it does not print anything

can anyone tell me what the problem is with above syntax.

Thanks,
Gayatri
 
Dave Wood
bronco
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Query parameters are not request scope attributes (unless you explicitly copy them there). What you want is the "param" implicit object. Like this:

${param.task}

Hope that helps.
 
Gayatri Ganesh
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes that works
Thanks very much.
Gayatri
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!