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,301
  • 1
  • 13
  • 26

1 Answers1

2

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
  • 71,889
  • 31
  • 184
  • 335