Announcement Announcement Module
Collapse
No announcement yet.
using webflow in a jsp:include Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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....

    Comment


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

      Comment


      • #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:

        Code:
        <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
        <%@ taglib prefix="cms" uri="/WEB-INF/tld/cmstags.tld" %>
        <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
        	<head>
        		<title>Site title</title>
        	</head>
          <body>
        	
        	<!-- NAVIGATION -->
          <jsp:include page="/includes/navigation.jsp" />
        
          <!-- BREADCRUMB -->
          <div id="breadcrumb">
            <jsp:include page="/includes/breadcrumb.jsp" /> 
          </div>
        
          <!-- MAIN -->
         	<div class="center">
                  <!-- INCLUDE WEBFLOW -->
                  <jsp:include page="/flows/eventBooking" />
        	</div> 
        			
          </body>
        </html>
        My webflow config file looks like this:

        Code:
        <?xml version="1.0" encoding="UTF-8"?>
        <beans xmlns="http://www.springframework.org/schema/beans"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:webflow="http://www.springframework.org/schema/webflow-config"
          xsi:schemaLocation="
                   http://www.springframework.org/schema/beans
                   http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                   http://www.springframework.org/schema/webflow-config
                   http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd">
        
          <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" />
          </webflow:flow-registry>
        
          <bean name="eventBooking" class="web.flow.MyFlowHandler" />
        
          <bean  class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter" />
        
        </beans>
        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

        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.

          Comment

          Working...
          X