I've got 2 JSPs. JSP1 calls JSP2 to format a table in JSP1

JSP1 calls JSP2 using this code:

<jsp:include page='<%=(String)request.getAttribute("SB_Format_Path")%>' flush="true" ></jsp:include>

The problem is that JSP2 has access to variable XX, at runtime but JSP1 does not have access to it. I'd like to somehow be able to access variable XX from JSP1, but I've researched and haven't found a solution to my partiucal problem.

Thanks.

Recommended Answers

All 3 Replies

There are solutions called servlet and sessions.

What is actually your aim? What you trying to achieve by this page to page data handling?

There are solutions called servlet and sessions.

What is actually your aim? What you trying to achieve by this page to page data handling?

Hi,

I'm just trying to display the variable on JSP1. There is a variable for each jsp that is unique that I can only really get at runtime.

Hi,

Thanks a lot for you reply. I found out about the session variable you mentioned and it did the trick! Thanks a lot. Its the same feeling as writing my first hello-world programs!

See ya.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.