2

I need to pass params to included jsp

 <%@ include file="second.jsp" %>

i need to use it several times in one jsp page, so i need to pass id. I can't use jsp:include because jsp can't see struts action in this way

Can u help me? Thank you

Pizza eu
  • 1,419
  • 1
  • 14
  • 27

1 Answers1

3

Set them as attributes on the request object (which makes them visible to the ${var} syntax) before invoking your include.

See How to access a request attribute set by a servlet in JSP? for a similar question.

Community
  • 1
  • 1
Thorbjørn Ravn Andersen
  • 73,784
  • 33
  • 194
  • 347