Hi, I am building an application using JSPs. There is a lot of data to be retrived from database and displayed in some JSPs. To make the code more readable and easy to debug, I want to delegate the retrival and display of some information to some code other than the present
JSP. Some thing like request forwarding. I don't want to go for request forwarding to another JSP or
servlet because the rest of the statements won't execute in the calling page. Even if I use
include(request,response), the output is not what I wanted.
I want a mechanism where I can forward some parameters to some code and the code prints response at the palce where it's called in the calling JSP and after printing the response the rest of the calling JSP code continues to execute.
Is it advisable to do the following:
Set the parameters I want to forward as session attributes and use <% include file= %> to do the processing by retriving the session attributes in that file and print response at the place where the file is included.
Please suggest some thing.