سؤال

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?

هل كانت مفيدة؟

المحلول

Try

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

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top