Announcement Announcement Module
No announcement yet.
Bean for FlowController not recognized Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bean for FlowController not recognized

    My apologies in advance for what could be a total newbie question.

    But I could use a little help with a question.

    My app is called gci. When I start the tomcat server I go to http://localhost:8080/gci/index.htm (BTW, the server works fine and I can run the example servlets and JSPs in tomcat)

    I am using webflow. And the problem I'm having is that the app doesn't seem to be picking up the bean for the FlowController. When I go to the URL above I get a 404, Requested Resource not available error. (The file does not in fact exist.) But that URL should be caught by the bean below:

    <bean name="/index.htm" class="org.springframework.webflow.executor.mvc.Fl owController">
    <property name="flowExecutor" ref="flowExecutor" />
    <property name="defaultFlowId" value="main-flow"/>

    I'm not getting any error messages in the Console. But that would be logical since the app doesn't even seem to be starting.

    This did all work at one point. But I had to move things around for release engineering’s reorg of the svn repository. I'm sure this must be something simple, but I don't have any errors to see, so I don't know where to look.

    Which makes me think the spring part isn't even starting, because the logging for the app isn't generating anything.

    I know this must be difficult to troubleshoot in any way from my description, but if you have suggestions or anything jumps out at you I would appreciate all the help I could get.

  • #2
    need some more info

    Do you have a view resolver?
    something like:
    <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
            <property name="viewClass"><value>org.springframework.web.servlet.view.JstlView</value></property>
            <property name="prefix"><value>/WEB-INF/jsp/</value></property>
            <property name="suffix"><value>.jsp</value></property>
    When you get the 404 error what is the file it can't find? If you don't have a view resolver and it can't find your index.htm perhaps your flow executor is setup wrong.

    What does your x-servlet-config.xml and x-webflow-config.xml look like?

    do you have any flows setup?


    • #3
      more info

      thanks for the response.

      actually, my view resolver is exactly what you posted for jsp files.

      however, I thought the bean for /index.htm would intercept if the URL was for that.

      the 404 error says it can't find /gci/index.htm
      I know that file isn't there, but maybe I misunderstand the configuration, but I thought the /index.htm bean would intercept.

      I have attached a text file that contains the two config files you mentioned.

      thanks again for the response.


      • #4
        Originally posted by jodo3k View Post
        the 404 error says it can't find /gci/index.htm
        You are right that it should be going to your defaultFlowId. What happens when you try going to /gci/index.htm?_flowId=main-flow


        • #5
          I get the same 404 error for /gci/index.htm.


          • #6
            You did not post your web.xml config. Is your spring dispatcher servlet configured to handle *.htm requests?


            • #7

              this is the web.xml

              <?xml version="1.0" encoding="UTF-8"?>
              <web-app version="2.4" 
              	<display-name>GCI Shopping Application</display-name>


              • #8
                you need to map your contextConfigLocations:



                • #9

                  I had that in there. both in the "default" place and in a config directory where I wanted to put them.

                  But it didn't seem to make a difference.


                  • #10
                    So did it fix it or do you still have the same issue?


                    • #11
                      I still have the issue. Any of the three conditions has the same results:

                      1. no config param - default places
                      2. config param for default places
                      3. config param for config directory

                      all generate the same 404 error mentioned above.

                      I do appreciate your thinking the problem though.


                      • #12
                        ok i think i found it

                        Ok I think I found the issue...your not going to like it though

                        Are you using jsps? Try changing your:
                        index.jsp is my default page right now but when I changed it to match your index.htm I got a 404 error. Perhaps the web.xml is overriding your *.htm mapping. Not sure I fully understand what is going on but its worth a try to see if changing your welcome file fixes the issue. Let me know...


                        • #13
                          and just so you know

                          Here is what my index.jsp looks like:

                          <%@ page session="false"%>
                          <%@ taglib prefix="c" uri="" %>
                          <%@ taglib prefix="fmt" uri="" %>
                          <%-- Redirected because we can't set the welcome page to a virtual URL. --%>
                          <c:redirect url="/ownerinformation.htm?_flowId=login-flow"/>
                          As noted in the comment you can't set the welcome page to a virtual URL so you may want to change that to something else


                          • #14

                            ok. I will remain calm...

                            I added the file. I did it with index.htm and index.jsp.

                            neither worked. it displayed the index.htm or index.jsp.

                            The connection to the webflow is just not being made.

                            I'm getting no errors. I keep reading the docs. I can't see what I'm leaving out.