This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.
No announcement yet.
Making a Hello World Flow... what am I missingPage Title Module
hey Marten Deinum I got your book this weekend but cant get chap10 running.. can you please help up
Judging from the emails you send you ran into an issue with either Gradle or the Gradle Plugin (we encountered it also on occasions). The recent code from our repository contains a fix in our build for that. Manually you can fix it by right clicking on the chapter10 project, goto j2ee dependencies (from the top of my head), find the 2 broken links to shared projects. Remove those and add them manually again, that should fix those classnotfoundexceptions.
1. Remove the ContextLoaderServlet because you don't have an applicationContext.xml also it is for use in servlet 2.3 and lower environments (You should use the ContextLoaderListener)
2. Your pattern to load your flows is wrong. The flows aren't on your classpath they are in /WEB-INF. So either move your flows to the classpath or change to /WEB-INF/flows/*-flow.xml.
3. You are trying to get a webflow 1.0 flow to work with webflow 2.0 that isn't going to work change it to a valid webflow 2.0 flow definition.
4. Remove the FlowController, use either the FlowHandler of FlowController not both.
5. You only have the HandlerAdapter you also need to FlowHandlerMapping for mappinig flows.
6. I suggest you use a final-build (2.3.1) of webflow instead of some snapshot build.
7. Again I strongly suggest a read of the chapters I pointed you to in the other thread on how to configure Spring Web Flow.
thanks again Marten... for chap10 your fixed worked but for my hellow world I made my changes but still no lucky.. I did read the book and dont understand why this is not working it should be so easy. please anyway for you to fix my new war?? please help me out.. I need to get a very easy sample working fast.
I did read it two times and I just dont understand web flow.. I need to see it and a very easy sample.. I made the two changes and still not working.. I reposted the project at https://www.dropbox.com/s/5mojqctfqk...oWorldFlow.war but it should not be this hard to do
imho it isn't hard... If you just follow the reference guide. The problem is you started with a webflow 1.0 project dumped in the webflow 2.0 jars and didn't work.
The steps on how to configure webflow (flow-executor and flow-registry) are described in chapter 10. How to do the integration with Spring MVC is described in chapter 11. The FlowHandlerMapping should also be the first mapping to be executed (order=0 as mentioned in the documentation).
You are only stating it doesn't work but what doesn't work? Please post errors/stacktraces.
Your sample includes a controller as well as a flow both do the same select the helloworld view to render.
A final suggestion is enable debug logging for org.springframeworkto see what is happening especially the mapping.
Another thing I noticed your servlet is mapped to *.html whereas it should be mapped to / or /*...
I am trying to do my best. once I see it work in a barebones example I will understand better.. below is the console messages I am getting now
2012-07-24 09:58:16,803 [tomcat-http--9] DEBUG org.springframework.web.servlet.DispatcherServlet - DispatcherServlet with name 'spring' processing GET request for [/MyHelloWorldFlow/helloworld]
2012-07-24 09:58:16,803 [tomcat-http--9] DEBUG org.springframework.webflow.mvc.servlet.FlowHandle rMapping - No flow mapping found for request with URI '/MyHelloWorldFlow/helloworld'
2012-07-24 09:58:16,804 [tomcat-http--9] WARN org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/MyHelloWorldFlow/helloworld] in DispatcherServlet with name 'spring'
2012-07-24 09:58:16,804 [tomcat-http--9] DEBUG org.springframework.web.servlet.DispatcherServlet - Successfully completed request
checkout the new war. I made alot of changes. please help me out.. once I see it working and can please with it I will understand.. I just nee do get page one displaying, click to page 2 and a click back to page 1.. please look at my war... you been great but just help me get this working..
I'm not planning on doing your work, I'll give you some pointers but it stops there. I do this in my spare time...
I suggest you take a look at the startup logging especially the FlowRegistry that gives you the id and with that the url under which your flows are mapped.
For more information I suggest you take a look at the webflow sample application (the hotel booking sample) which is basic flow with multiple screens. Nothing to fancy that way you get an idea. You also might want to take a look at [urlhttp://numberformat.wordpress.com/2009/11/09/spring-web-flow-2-hello-world/]this[/url] tutorial (it is for webflow 2.0 but should be almost a 1-on-1 for 2.3).
Well I want to help you but I'm not going to change/fix your code, I will look at your configuration and setup and give the things I notice (and point you to some other resources). I think the last resource I mentioned (the tutorial) should help you to get started, also (but I'm biased on that one) I think our book also does a nice step-by-step introduction which explains all the steps. So basically if you have chapter 10 running you already have something which is more or less your hello world.