war

Deploying Java webapp to Tomcat 8 running in Docker container

巧了我就是萌 提交于 2019-11-28 17:43:54
I am pretty new to Tomcat and Docker - so I am probably missing a Tomcat fundamental somewhere in this question. What I am trying to do is build a Docker container that runs a SpringBoot Restful web service that just returns some static data. This is all running on OSX so I am using Boot2Docker as well. I've written my own Dockerfile to build the container that my app runs in: FROM tomcat:8.0.20-jre8 RUN mkdir /usr/local/tomcat/webapps/myapp COPY /1.0-SNAPSHOT/my-app-1.0-SNAPSHOT.war /usr/local/tomcat/webapps/myapp/ This Dockerfile works fine and I am able to start the container from the

Where do Spring bean configuration files go in a Maven WAR module?

别等时光非礼了梦想. 提交于 2019-11-28 17:20:17
I've looked at a bunch of sample projects and I can't seem to tease out a common best practice. I've seen Spring bean config files sometimes go in the src/main/webapp/WEB-INF directory. I've seen this in conjunction with with a Servlet definition in web.xml like this: <servlet> <servlet-name>my-stuff</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/my-stuff-servlet.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> But I've also seen bean

Linux command for extracting war file?

自闭症网瘾萝莉.ら 提交于 2019-11-28 17:16:54
问题 How can I extract a .war file with Linux command prompt? 回答1: 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 回答2: Or jar xvf myproject.war 回答3: A war file is just a zip file with a specific directory structure. So you can use unzip or the jar tool for unzipping. But you probably don't want to do that. If you add the war file into the webapps directory of Tomcat the

How to deploy WAR of Maven Project to JBoss server from Eclipse?

余生长醉 提交于 2019-11-28 16:36:46
问题 I want to deploy WAR of Maven project to JBoss server. I know that from Eclipse Export->War deploy the WAR file to JBoss. But How can I do this for Maven Project. Any step by step information or useful website link will be very helpful to me. Thank you. Edit: I have added <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jboss-maven-plugin</artifactId> <version>1.5.0</version> <configuration> <jbossHome>/home/tanmoy/Jboss</jbossHome> <serverName>all</serverName> <fileName>target

Advantages/Disadvantages to exploded WAR files

纵然是瞬间 提交于 2019-11-28 16:29:41
An answer to a question I read today suggested deploying an application as an exploded (unzipped) WAR . It got me thinking. Every deployment I've ever done to a JBoss/Tomcat has been with a a WAR/ EAR file. At least as far as I can remember. Have I been making a mistake all these years? Are there advantages to deploying an app in its expanded form rather than packaged up? I think that was my answer mentioning the exploded WAR in the other question. Exploded WARs are easier to navigate and you can deploy 'parts' of your application that much quicker (depending on how our Web/App server deals

how to Build project with maven without version

谁都会走 提交于 2019-11-28 16:28:50
in one of my project i need to build one project without version. i have one project call commonjerseylib when i build it by using maven i am getting commonjerseylib-1.0.war but i need war file name commonjerseylib.war I remove version tag from pom but still by default maven is creating with 1.0 version. Thank you in advance <modelVersion>4.0.0</modelVersion> <groupId>commonjerseylib</groupId> <artifactId>commonjerseylib</artifactId> <packaging>ear</packaging> <name>commonjerseylib</name> <!--<version>1.0</version>--> prunge You will always need a version number for a project, however it is

How to make maven place all jars common to wars inside the same EAR to EAR root?

廉价感情. 提交于 2019-11-28 16:24:55
We have a solution with numerous wars. Wars are similar in the sense they all use hibernate and spring. This means that we have a number of same jars inside each war. This is becoming a problem, because the size of the ear is starting to grow out of proportion. I would like to use Maven to calculate dependencies and to place all jars common to multiple wars to the root of the EAR. I tried organizing my project using j2ee archetype (maven-archetype-j2ee-simple), but all wars are still packaged with dependencies inside the WEB-INF/lib. Is there a way to make Maven calculate common dependencies

Jetty Run War Using only command line

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-28 15:58:51
Is it possible to use only the command line to Run jetty with only a specified war file and Context Path. Something like : java -jar $jettyHome/start.jar -Dwar.location=myApp.war -DcontextPath=/myApp OPTIONS=default,plus,jsp rado Use the jetty runner . java -jar jetty-runner.jar my.war With Maven, you can install by adding to your pom.xml : <build> ... <plugins> ... <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.3</version> <executions> <execution> <phase>package</phase> <goals><goal>copy</goal></goals> <configuration>

deploying multiple applications to Tomcat

自作多情 提交于 2019-11-28 14:38:06
问题 I want to deploy two applications foo.war and bar.war to the same Tomcat instance. Is it possible for them to listen for connections on different ports, e.g. foo listens on port 81 and bar listens on port 82? If so, how can I configure this? I realise that it is not necessary for the applications to listen on different ports, but that is what I want to achieve. Also, am I right in saying that if I rename foo.war to ROOT.war such that it runs in the root context, then all requests to this

Ignore SVN files when exporting a WAR file from Eclipse?

跟風遠走 提交于 2019-11-28 10:58:31
I have a Dynamic Web Project in Eclipse. I can pack it to a WAR by right-clicking the project and choosing Export > WAR File. This creates the WAR file as expected and it works. The problem is that Eclipse includes all the .svn folders of the project into the WAR file. Is there a way to tell Eclipse to ignore .svn folders in the WAR exporting process? Or even better, tell it to ignore all files or folders that match some given regular expression? Talles Enter the project properties > Resource > Resource Filters > Add... > Exclude All > Files and Folders > All children (recursive) > Name