5 Replies Latest reply on Apr 19, 2006 8:54 AM by goinflex

    Problem installing Flex under Tomcat

      I do not know Java and am unfamiliar with Tomcat, but I have an app installed on my machine that requires Tomcat. Long story. But I wanted to try Flex, so I installed it, but can find only general information about what I need to do to get Flex working under Tomcat.

      I copied the flex.war and samples.war file to the Tomcat (4.1.??) deploy directory and restarted Tomcat. I see errors in the log like the following:

      16:01:51,968 ERROR [STDERR] BootstrapClassLoader: the application server doesn't
      return a valid path for ServletContext.getRealPath(); try expanding the war fil
      e before deploying.
      16:01:52,015 ERROR [Engine] StandardContext[/flex]: Exception starting filter Fl
      javax.servlet.ServletException: flex.server.j2ee.cache.CacheFilter

      I also have no idea what port Flex is supposed to be on, as one example mentioned 8101 and another mentions 8700, and an attempt to access port 8080 prompts me for login (presumably something related to the other app on my machine that uses Tomcat).

      What do I need to look for to configure Tomcat for Flex? I tried looking at Tomcat docs, but don't have the time to study them, and found references to files like server.xml that simply do not exist on my machine.

      Any help is appreciated!
        • 1. Re: Problem installing Flex under Tomcat
          ntsiii Level 3
          Assuming this is version 1.5.

          If you want to just try Flex, install it using the "Integrated JRUN" option. If will probably just work "out-of-the-box".

          If you want to run Flex under Tomcat, you will have to do what it takes, which is not really that much, but it will occasionally require that you spend the time finding and reading the Tomcat docs.

          * First, you need to upgrade your Tomcat to version 5.
          * Make sure you can run the sample JSP applications that come with Tomcat. The install peobably will display a "success" page.
          * Tomcat is supposed to automatically expand the war file but I do not understand or trust this so I manually create a "flex" folder in Tomcat's "webapps" folder, and then expand/unzip(change the .war extension to .zip and use winzip) the war file into the new "flex " folder. Restart the tomcat service. There must be a "WEB-INF" folder under the "flex" folder
          * Create a "hello, world" mxml file in the "flex" folder, and run it. The url will be:

          That should be all you need to do to get going.


          • 2. Re: Problem installing Flex under Tomcat
            ntsiii Level 3
            If the other app is using port 8080 and is authenticating, you will have to dig into the configuration files to find out how the authentication is set up.

            You will have to understand J2EE authentication to be able to successfully modify the configuration. Again, I have heard it is not that difficult, but it will definitely call for a few hours of studying.

            Are you sure you want to do this?

            • 3. Re: Problem installing Flex under Tomcat
              Kwooda Level 1
              Since I doubt I am the only one running Flex with Tomcat, I was hoping to get feedback from someone who knows Tomcat about what config files I should look at and where to find them, since I had little luck with the time I spent in the Tomcat docs. I also have no leeway to upgrade to Tomcat 5. And as far as using Jrun4 "out of the box", I assume it won't "just work" since there appears to be something already on my system using port 8080.

              I use forums to save time by pinging people who have knowledge, so unfortunately responses like "Google it" and "RTFM" are less than useful. I'm happy to do "what it takes" if I can get some insight as to what, exactly, that is. I work better from the bottom up if anyone can direct me to what config files, etc., affect my setup and where to look for them.

              Also, is JBOSS something unique and different from Tomcat, 'cause it's in there, too. Ugh.
              • 4. Re: Problem installing Flex under Tomcat
                ntsiii Level 3
                No, the integrated install will probably work as it defaults to 8700. This is the way to go If you want to work with Flex the fastest way.

                You are not the only one running Tomcat. I have gotten three installations in production, starting with no J2EE knowledge at all. But mine were clean, current, stand-alone installs. You are on a more difficult road: An obsolete servlet container, a legacy program that you neither installed nor configured, authentication you did not configure and an admitted lack of J2EE admin experience. There are some J2EE powerhouses monitoring this forum, perhaps they will be willing to help you.

                You might have better luck on a pure Tomcat forum, since your issues are not specifically Flex issues. Good luck.

                • 5. Re: Problem installing Flex under Tomcat
                  For our organization, the sequence of installing seemed to be a factor: Java JRE, Flex, and then Tomcat (v5).
                  Just a quick note to other developers, we also use jrun and find it much simpler than Tomcat, but you run into the trade-off between licencing and free.