Results 1 to 8 of 8

Thread: Uploading a WAR file

  1. #1
    Join Date
    Aug 2009
    Posts
    4

    Default Uploading a WAR file

    I just built a grails-app, turned it into a WAR file, and uploaded it to CloudFoundry.

    During the upload process I was asked for a CONTEXT ROOT. Not sure what that means.

    Also, I was asked for database name, user, and password. Not sure if my grails-app needs this or not.

    Any help would be appreciated.

  2. #2

    Default

    The context root is the root path in the URL past the host name which is used to access your application. Conventionally it is the same as the name of your war file.

    For example, if I deploy mywebapp.war to tomcat, then by convention I can access it at http://localhost:8080/mywebapp

    In this case, "/mywebapp" is the context root.

    As for the database settings, I had the same problem when deploying to Cloud Foundry; it prompted me for apparently required database settings but my application did not use a database. I just provided a database name, user, and password that seemed appropriate as though my application did need a database, and assumed it would be created but unused. It didn't cause any issues during deployment.

  3. #3
    Join Date
    Jun 2005
    Posts
    102

    Default

    Cloud Foundry creates the database with the settings you specify:

    * If your application needs a database => enter the schema name, user id, and password that your application expects
    * If you application does not need a database => enter some dummy values and ignore the database

  4. #4
    Join Date
    Aug 2009
    Posts
    4

    Default

    Thanks, that makes sense.

    When deploying to EC2 there's a field for the public IP (the Elastic IP address). I'm not sure what (if anything) to place in this field.

  5. #5
    Join Date
    Aug 2009
    Posts
    61

    Default

    The Elastic IP is a feature of AWS that is nicely described here: http://docs.amazonwebservices.com/AW...ddressing.html

    Essencially, you can reserve an IP address from Amazon, and assign it to an already running instance. It enables mapping DNS entries to Amazon EC2 instances.

    If you don't have any Elastic IP addresses reserved, you don't need to enter anything in this field when launching your application.

  6. #6
    Join Date
    Aug 2009
    Posts
    4

    Default Elastic IP

    Thanks. I don't need an elastic IP, so my next question would be the proper method for connecting to my EC2-deployed webapp with my local browser.

  7. #7
    Join Date
    Aug 2009
    Posts
    61

    Default

    Once you application is launched and you see it in the list of running deployments, you click on in, and end up on the Deployment Details page. There will be a link "Go to Homepage", which will bring you to the home page of you newly deployed application.

  8. #8
    Join Date
    Aug 2009
    Posts
    4

    Default

    Yes I can see it and it works. Thanks for the help!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •