RequestDispatcher include of jsp is not coming in place

Hi,

I want to include the FCHTMLRenderer.jsp page in my jsp, I am doing with RequestDispatcher using following code,
but the included jsp code is coming in first para of the even before the HTML tag, I want to display withing the Table TD.When I am doing with JSP include it is working fine, but i want to use the RequestDispatcher  as I need to pass the parameters dynamically
Please suggest the possible solution,


<table>
        <tr>
        <td width="<%=width%>" >
        <%RequestDispatcher rd=request.getRequestDispatcher("FCHTMLRenderer.jsp"+par1);
        rd.include(request,response);%>
          <BR>
          <BR>
          </td>
        <td width="<%=width%>">
            <jsp:include page="FCHTMLRenderer.jsp" flush="true">
                <jsp:param name="chartSWF" value="/OA_HTML/eisrs/jsp/dashboard/FC/MSColumn3D.swf" />
                <jsp:param name="strURL" value="/OA_HTML/eisrs/jsp/dashboard/XMLData/SecondChartData.xml" />
                <jsp:param name="strXML" value="" />
                <jsp:param name="chartId" value="chart2" />
                <jsp:param name="chartWidth" value="450" />
                <jsp:param name="chartHeight" value="300" />
                <jsp:param name="debugMode" value="false" />
                <jsp:param name="registerWithJS" value="false" /> 
            </jsp:include>
 
            <BR>
            <BR>
            </td>
            
          </tr>
          </table>

Open in new window

ramadevimandalaAsked:
Who is Participating?
 
ramadevimandalaConnect With a Mentor Author Commented:
:)
I got the solution...

just did out.flush(); before rd.inclue(..)...
0
 
mahomeConnect With a Mentor Commented:
You can use the include syntax with an expression in the value:

<jsp:include page="FCHTMLRenderer.jsp" flush="true">
    <jsp:param name="par1Name" value="<%= par1Value %>" />   
    ...

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.