Announcement Announcement Module
No announcement yet.
using webflow in a jsp:include Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • using webflow in a jsp:include

    I have an application based on a CMS using spring mvc. The CMS has its own templating system. That's why I have to be able to include a webflow into the template with a <jsp:include page="flowId">.

    But this doesn't work as no html at all is being rendered. Does including a flow with "jsp:include" even work?

  • #2
    Ok, so nobody did try to integrate a flow in an existing page with a "jsp:include" tag? The problem is that inside the "jsp:include" nothing is being displayed.
    I thought first that the request path is the problem because on a forward the original request doesn't change. That's why I tried to overwrite the FlowURLHandler but even then it didn't work.

    Has somebody an idea?
    Thanks for the answers....


    • #3
      I think you may get more help if you posted the relevant portions of your JSP(s)


      • #4
        Hi, thanks for your reply and sorry that I didn't post any jsp code. It's just because I thought that it's a general problem.

        So here are my JSP's:

        <%@ taglib prefix="c" uri="" %>
        <%@ taglib prefix="cms" uri="/WEB-INF/tld/cmstags.tld" %>
        <%@ taglib prefix="spring" uri="" %>
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">
        <html xmlns="" xml:lang="de">
        		<title>Site title</title>
        	<!-- NAVIGATION -->
          <jsp:include page="/includes/navigation.jsp" />
          <!-- BREADCRUMB -->
          <div id="breadcrumb">
            <jsp:include page="/includes/breadcrumb.jsp" /> 
          <!-- MAIN -->
         	<div class="center">
                  <!-- INCLUDE WEBFLOW -->
                  <jsp:include page="/flows/eventBooking" />
        My webflow config file looks like this:

        <?xml version="1.0" encoding="UTF-8"?>
        <beans xmlns=""
          xmlns:xsi="" xmlns:webflow=""
          <webflow:flow-executor id="flowExecutor" />
          <webflow:flow-builder-services id="flowBuilderServices" />
          <!-- The registry of executable flow definitions -->
          <webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices" base-path="/WEB-INF/flows">
            <webflow:flow-location-pattern value="/*/*-flow.xml" />
          <bean name="eventBooking" class="web.flow.MyFlowHandler" />
          <bean  class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter" />
        I'm sure the flow is being called but the view is not being displayed at all. What could be the problem?

        EDIT: if I use an iframe outside the jsp:include tag then the flow works perfectly but an iframe isn't really an element that I'd like to use because of design issues.
        Last edited by sua; Apr 29th, 2010, 12:58 AM. Reason: Additional comment


        • #5
          Ok, after many tries I think that I'll give up.

          Finally I found out that the empty page results everytime I try to include a page which does not pass the Spring MVC Filter. When using the jsp:include tag a forward is being made so the request does not pass through the filters any more.

          If somebody came across the same issue please reply. Meanwhile I'll look for another solution because I have to be able to include flows without a redirect.

          Anyway, thanks for reading this thread.