Hey to all!
I'm trying to get an externalRedirect ro some way or redirecting to a pdf page residing
at WEB-INF/reports/report2.pdf for example...
my view state is in:
I've tried everything to get my view to get simply handled/resolved to this path...Code:<?xml version="1.0" encoding="UTF-8"?> <flow xmlns="http://www.springframework.org/schema/webflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"> <secured attributes="ROLE_USER" /> <persistence-context/> <var name="hotelReport" class="org.springframework.webflow.samples.jasper.HotelReport" /> <var name="reportController" class="org.springframework.webflow.samples.jasper.ReportController" /> <input name="searchCriteria" required="true" /> <on-start> <evaluate expression="bookingService.addMsg('now in subflow...')" /> </on-start> <view-state id="hotelReport.view" view="externalRedirect:http://localhost:8080/swf-booking-faces/spring/reports/report.pdf" popup="true"> <on-entry> <!-- <evaluate expression="reportController.handleSimpleReport(bookingService.findHotels(searchCriteria,externalContext.locale))" result="flashScope.modelAndView" /> --> <evaluate expression="bookingService.makeHotelReport(bookingService.findReportHotels(searchCriteria,externalContext.locale))" /> <evaluate expression="bookingService.addMsg('entered view-state displayPdfState')" /> </on-entry> <transition to="report.end"/> </view-state> <end-state id="report.end" /> </flow>
Problem is that I'm using facelets and my comfiguration just maps/resolves to:
http://localhost:8080/swf-booking-fa...s/report.xhtml as per the UrlBasedViewResolver
what changes could i make to force the redirect to bypass the UrlBasedViewResolver??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" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> <!-- Maps request paths to flows in the flowRegistry; e.g. a path of /hotels/booking looks for a flow with id "hotels/booking" --> <bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping"> <property name="flowRegistry" ref="flowRegistry" /> <property name="defaultHandler"> <!-- If no flow match, map path to a view to render; e.g. the "/intro" path would map to the view named "intro" --> <bean class="org.springframework.web.servlet.mvc.UrlFilenameViewController" /> </property> </bean> <!-- Maps logical view names to Facelet templates in /WEB-INF (e.g. 'search' to '/WEB-INF/search.xhtml' --> <bean id="faceletsViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver"> <property name="viewClass" value="org.springframework.faces.mvc.JsfView"/> <property name="prefix" value="/WEB-INF/" /> <property name="suffix" value=".xhtml" /> <property name="order" value="2" /> </bean> <bean id="mvcViewFactoryCreator" class="org.springframework.webflow.mvc.builder.MvcViewFactoryCreator"> <property name="viewResolvers"> <list> <ref bean="jasperViewResolver" /> <ref bean="faceletsViewResolver" /> </list> </property> </bean> <!-- the ResourceBundleViewResolver --> <bean id="jasperViewResolver" class="org.springframework.web.servlet.view.ResourceBundleViewResolver"> <property name="basename" value="views"/> <property name="order" value="1" /> </bean> <!-- Dispatches requests mapped to org.springframework.web.servlet.mvc.Controller implementations --> <bean class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter" /> <!-- Dispatches requests mapped to flows to FlowHandler implementations --> <bean class="org.springframework.webflow.mvc.servlet.FlowHandlerAdapter"> <property name="flowExecutor" ref="flowExecutor" /> </bean> </beans>
I've tried many things even an external servlet but nothing works?
Any help appreciated,
cheers!


Reply With Quote