cancel
Showing results for 
Search instead for 
Did you mean: 

Include a JSP inside another JSP

srinivas_sistu
Active Contributor
0 Kudos

Hi SDN,

I am stuck with a problem. There is a JSP file available. In this JSP I have to add some more fields. But when I try to ad new fields I am getting a Portal Runtime Error stating that "Code Too Large". So now I thought of putting the new code in another JSP and include that JSP inside my main JSP. Here I cannot use <@include file="..."> because this finally compiles both the JSPs as one.

So I tried to use <JSP:include>. Some one please help me with how to include a JSP inside another using <JSP:include>. Here both the JSPs are having HBJ content inside.

I know that <jsp:include page="relPathOfChild.jsp"/> will include the child.jsp into my main jsp. Problem is both the JSPs are having HBJ content, so If I dont declare <hbj:content> tag inside the child jsp, it is throwing an error. But If I declare a <hbj:content> tag inside my child jsp, only child content is coming and main jsp content is not coming.

Please help me..

Regards,

SrinivaS

Accepted Solutions (0)

Answers (2)

Answers (2)

srinivas_sistu
Active Contributor
0 Kudos

Problem Solved. thank you...

Former Member
0 Kudos

Hi,

sorry I have same problem.

How do you resolve it?

Thanks

p_k3
Participant
0 Kudos

Hi can you try using some other name space insted of "HBJ" in the second JSP

If possible can u send me both ur JSPs so that i too cn give it a try "kulpavone at yaho o . co . in"

srinivas_sistu
Active Contributor
0 Kudos

Hi,

This Problem is solved. Now I am able to include a child JSP inside the parent JSP. But now the problem is,

This Parent JSP will have 8 tabs. Now my chils JSP should come inside 7th tab. but it is coming above the parent JSP.

Below is how I am including my child JSP.

.

.

.

.

<% try{ if(isCAR){

%>

<tr>

<jsp:include page="/pagelet/CAREligibility.txt" />

</tr>

<%} } catch(Exception e) {}%>

.

.

.

.

Please help.

Regards,

SrinivaS