Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

param Map in EL

 
sangeeta kapoor
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my html form I have an input element such as

Name <input type="text" name="name" /> <br />

And in my JSP to which the form is submitted, I am doing

Name ${param.name}

It works perfectly fine to print the value.

But instead of printing the value if I want to assign it to a variable, how can i do that without using scripting?
In other words, how to do the following without scripting

<% String s = request.getParameter("name") ;%>
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

use <c:set var="s" value="${param.name}" />

This will create a new variable s in default page scope and assign a value.

For this you have to use Standard Tag Libraries (JSTL)

Thanks
[ February 07, 2005: Message edited by: Narendra Dhande ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic