How to create war files

You can use Ant to set up, compile, WAR, and deploy your solution. <target name=”default” depends=”setup,compile,buildwar,deploy”></target> You can then execute one click in Eclipse to run that Ant target. Here are examples of each of the steps: Preconditions We’ll assume that you have your code organized like: ${basedir}/src: Java files, properties, XML config files ${basedir}/web: … Read more

Linux command for extracting war file?

Using unzip unzip -c whatever.war META-INF/MANIFEST.MF It will print the output in terminal. And for extracting all the files, unzip whatever.war Using jar jar xvf test.war Note! The jar command will extract war contents to current directory. Not to a subdirectory (like Tomcat does).

Oracle JDBC ojdbc6 Jar as a Maven Dependency

It is better to add new Maven repository (preferably using your own artifactory) to your project instead of installing it to your local repository. Maven syntax: <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> <version>11.2.0.3</version> </dependency> … <repositories> <repository> <id>codelds</id> <url>https://code.lds.org/nexus/content/groups/main-repo</url> </repository> </repositories> Grails example: mavenRepo “https://code.lds.org/nexus/content/groups/main-repo” build ‘com.oracle:ojdbc6:11.2.0.3’

Update Jenkins from a war file

You can overwrite the existing jenkins.war file with the new one and then restart Jenkins. This file is usually located in /usr/share/jenkins. If this is not the case for your system, in Manage Jenkins -> System Information, it will display the path to the .war file under executable-war.

IntelliJ and Tomcat….changed files are not automatically recognized by Tomcat

This cannot be done if you deploy a war with IntelliJ IDEA. However, it can be if you deploy an exploded war. In IDEA: open your Tomcat Run/Debug configuration (Run > Edit Configurations) Go to the “Deployment” tab In the “Deploy at Server Startup” section, remove (if present) the artifact my-webapp-name:war Click the add icon, … Read more

What is WEB-INF used for in a Java EE web application?

The Servlet 2.4 specification says this about WEB-INF (page 70): A special directory exists within the application hierarchy named WEB-INF. This directory contains all things related to the application that aren’t in the document root of the application. The WEB-INF node is not part of the public document tree of the application. No file contained … Read more

“webxml attribute is required” error in Maven

It would be helpful if you can provide a code snippet of your maven-war-plugin. Looks like the web.xml is at right place, still you can try and give the location explicitly <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <configuration> <webXml>src\main\webapp\WEB-INF\web.xml</webXml> </configuration> </plugin>

How to deploy a war file in Tomcat 7

You can access your application from: http://localhost:8080/sample Deploying or redeploying of war files is automatic by default – after copying/overwriting the file sample.war, check your webapps folder for an extracted folder sample. If it doesn’t open properly, check the log files (e.g. tomcat/logs/catalina.out) for problems with deployment.