A Developer's Diary

Showing posts with label Tomcat. Show all posts
Showing posts with label Tomcat. Show all posts

Jan 3, 2013

Deploying web applications using maven command line

Maven comes up with a powerful list of features and plugins for rapid application development, deployment and testing.

While developing web applications, the need is always felt to deploy, undeploy and redeploy applications using the command line. For apache tomcat, maven comes up with a tomcat-maven-plugin which facilitates the same.

1. Follow the steps mentioned in the post for creating a simple web application.
2. Add the below lines in your pom.xml. This will download the tomcat-maven-plugin jar in your local maven repository.

<build>
    <finalName>webapp</finalName>
    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>tomcat-maven-plugin</artifactId>
                <configuration>
                    <url>http://localhost:8080/manager/text</url>
                    <username>admin</username>
                    <password>admin</password>
                </configuration>
            </plugin>
    
        </plugins>
    </pluginManagement>
  </build>

Read more ...

Apr 4, 2008

Java - Debugging In Tomcat 5.5

Steps to be followed to enable debugging in Tomcat 5.5 through Eclipse

Configuring Tomcat
1. Go to configure options in Tomcat5.5
2. Select Tab "Java" and in Java Options add the following lines
-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000

Configuring Eclipse
1. Click on Debug
2. Select Remote Java Application
3. In connection properties add host and Port = 8000
4. Add break point

Happy Debugging :)
Read more ...