0

I want to get a variable that I search in JSP, something like this

<s:textfield value="<%=request.getParameter("id")%>" /> 

How to use getParameter() in Struts 2 tag?

Roman C
  • 49,761
  • 33
  • 66
  • 176
boyka
  • 27
  • 1
  • 7
  • I load in my jsp page inside an emplty div another jsp using ajax when I click on link and I want to get in hidden input id passed with ajax I can see it with this instruction <% String f=request.getParameter("id"); System.out.println(f); %> – boyka Sep 14 '13 at 20:48
  • I m traying this but is not works – boyka Sep 14 '13 at 21:03

1 Answers1

1

Try

<s:textfield  value="%{#parameters.id}" />

scriptlets as well as JSTL EL not allowed in struts tags attributes. Use OGNL.

Roman C
  • 49,761
  • 33
  • 66
  • 176