0

I have a framework based on JSP, and I want to move the logic from the JSP in Java, so for that I'm using a POJO with

<jsp:useBean id="myBean" class="myClass" scope="page"/> 
<c:set var="myVariable" scope="request" value="${myBean.myGetter}"/>

I have a reference to the request in myClass. My question is if I can set some attributes on request, do a RequestDispatcher.include to a JSP that will use the attributes I set, when the call gets back, to use some attributes that were put on the request by the included JSP.

I used RequestDispatcher only in servlet/filter, but not on a POJO within a getter.

Cosmin Cosmin
  • 1,526
  • 1
  • 16
  • 34

1 Answers1

0

Yes, if you have reference to request you can do it. Ultimately, the JSP code is translated to Servlet, and calling include in Bean will be as same as calling it from code within servlet.

Ramesh PVK
  • 15,200
  • 2
  • 46
  • 50