go to  ForumEasy.com   
JavaPro
Home » Archive » Message


[Email To Friend][View in Live Context][prev topic « prev post | next post » next topic]
  Side notes for .war deployment.
 
Subject: Side notes for .war deployment.
Author: AwsEC2
In response to: The working case for my web application deploy
Posted on: 08/29/2012 06:53:16 PM

1) Upload .war file to folder you have the write (-w) permission as ec2-user.

2) As root user, move (sudo mv) the .war file to webapps folder (owner=root; drwxr-xr-x).

Note: the owner of the file remains unchanged after move.

3) AWS has no outbound security rules. That means your application running within EC2 can use any outgoing port, like 587 for SMTP TLS mail service. If the mail failed, it was not because the port 587 got blocked. Most likely, as it did happen for Gmail, the SMTP server rejected the request.


 

> On 11/16/2011 06:55:00 PM WebSpider wrote:


Step 1) Keep Tomcat configuration untouched:

<Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">



Step 2) Copy myConext.war onto <TOMCAT>/webapps:

 + .. webapps
    + .. jsp-examples
    + .. ROOT
    + .. webdav
    .... myContext.war


Step 3) Startup Tomcat

 + .. webapps
    + .. jsp-examples
    + .. ROOT
    + .. myContext
      + .. css
      + .. img
      + .. js
      + .. WEB-INF
        + .. classes
        + .. lib
        .... web.xml
      .... index.html
    + .. webdav
    .... myContext.war


Step 4) That's it.

No configuration about <context/> is needed since it's under webapps already. The web application can be accessed by:
http://localhost:8080/myContext/index.html


Note: The war file name turns to be the context name of your web application. While building war file, make sure the war file name is the context name rather than the project name:
 + .. myEclipseWorkplace
    + .. myProject1 <--right click on this to export web/war file
      + .. .settings
      + .. src
      + .. myContext <--choose this name as war file name
        + .. css
        + .. img
        + .. js
        + .. WEB-INF
          + .. classes
          + .. lib
          .... web.xml
        .... index.html
    + .. myProject2
    + Servers






References:

 


 
Powered by ForumEasy © 2002-2022, All Rights Reserved. | Privacy Policy | Terms of Use
 
Get your own forum today. It's easy and free.