Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Deploy Smart GWT on Apache Tomcat

    Hi Everyone

    I have tried to deploy SmartGWT application with Apache Tomcat 6.0

    I have created

    /gwtdemo/webapps as context directory.
    /gwtdemo/webapps/WEB-INF/
    /gwtdemo/webapps/WEB-INF/lib
    /gwtdemo/webapps/WEB-INF/classes

    I have included all jars of GWT & 2 jars of SmartGWT.
    xml also includes
    <inherits name="com.smartgwt.SmartGwt"/>

    But when i run it, it does not show anything.
    Last edited by mhardik; 28 Dec 2010, 21:20.

    #2
    Start by examining the hello-world sample that is part of the Smart GWT distribution. It has an ant build file with a "war" target that produces a war file that you can drop in tomcat and have it deployed. Once you understand how the war is structures you can apply it to your project.

    Sanjiv

    Comment


      #3
      Hi Sanjiv,

      Thanks for reply.

      I have tried to build .war file using ant but it failed.Though I tried after setting GWT_HOME environment variable also.

      However, I looked into build.xml and it seems that it creates the same hierarchy of directories like i have mentioned above. But instead of /webapps which standard for Tomcat , it creates '/war' which Jetty uses.

      Will it work under tomcat ?

      Comment


        #4
        I was able to deploy SmartGwt under tomcat with the help a team mate.

        Though, Its very easy. SO, i thouht to put it here that might help others.

        Put your all dependency .jars are under /war/WEB-INF/lib.
        Clean the project with 'ant' or IDE like eclipse.
        Compile it with GWT Compile.

        Let say, you have gwt appln names "nil".
        So, you structure should like
        [nil/war/..]
        With all files residing under/war.

        Copy all contents from /war directory.

        Go to Tomcat/webpps.
        Create a dir called "nil".

        Paste all copied contents. Restart Tomcat.

        Then access using:
        http://localhost:8080/nil

        It should display your gwt application home page.

        Hope it helps.!!

        Comment


          #5
          No luck here deploying to tomcat

          Hi.

          I have managed to do and run a simple smartgwt application that I would like to deploy to tomcat ver 6.0.43 running on windows 7 x64.

          I did the application following the steps in this link:

          http://www.javacodegeeks.com/2010/06/getting-started-smartgwt-gwt-interfaces.html

          Tomcat is running OK and I can run "examples" application correctly. I used: http://localhost:8080/examples/ and it worked.

          The smartgwt application is running OK inside Eclipse but I want to test it with tomcat. I have tried the last solution in this thread of copying war contents inside \webapps\myproject\ and then when I go to:

          http://localhost:8080/myproject/ I get this error:

          HTTP Status 503 - This application is not currently available

          I have also tried:
          http://localhost:8080/myproject/myproject.html

          and get the same error 503 as above.

          I'm using chrome Version 40.0.2214.111 m, for testing in development mode (Eclipse) and with tomcat.

          I can't follow the first solution here because I'm new to java and related tools so I don't know what a ant build file is or where to find it. And by the way I can not find a hello world in the smartwgt samples so I had to look elsewhere (javacodegeeks.com).

          Any help please?

          Thanks in advance.

          Comment


            #6
            Now it is working on Tomcat :)

            The problem was tomcat was running on jdk 7.x and JRE Eclipse project configuration was set to use jre 8.x, so I created environment variable JRE_HOME to point to jre 8.x folder, tested and it worked.

            To do the test I used:

            http://localhost:8080/MyProjectName/

            I copied the files under 'war' folder (Eclipse) to tomcat folder 'webapps' as said mhardik.

            Thanks mhardik.

            Comment

            Working...
            X