war

How to run jetty 7+ with specified war with groovy/gradle?

[亡魂溺海] 提交于 2019-11-29 06:46:24
I want to run Jetty 7+ with gradle build, but unlucky looks like there is no way to do this with jettyRun. So probably simplest idea to achieve what I want would be to use custom target: task runJetty << { def server = new Server() // more code here server.start() server.join() } Unlucky I just started with gradle and I don't know groovy either, so it's hard for me to create proper target. I was looking over the internet but I wasn't able to find any solution. Can anyone hit me with some sample groovy code which can run existing jar with jetty? Ok, I found out how to run it using jetty

How to handle Maven WAR overlays in Eclipse?

不羁的心 提交于 2019-11-29 06:20:47
问题 I have a multi-module Maven project that makes use of WAR overlays (stack of them 3 deep). Everything works great in Maven, but I am unable to launch my WAR from within Eclipse because it complains of not finding various files. How can I configure Eclipse (and a launcher) so that I can run my WAR from Eclipse without having to do a Maven Install first? I should add that my Eclipse WAR projects are not dynamic web projects...is that a part of what I need to do? NOTE: The following question

Define contextroot inside WAR file

落花浮王杯 提交于 2019-11-29 04:02:11
I have an automated deployment script to deploy multiple WAR files in WAS 7 . So, I would like to define contextroot inside the WAR file itself. It should automatically set to " ... -contextroot xxxx ..." from the file. How do I do that? I think, I need to add something with WEB-INF/ibm-web-bnd.xml . I dont know what to write in it. Pls help, thanks. Create WEB-INF/ibm-web-ext.xml with these contents: <web-ext xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://websphere.ibm.com/xml/ns/javaee" xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com

How to create an war file in Eclipse without ant or maven?

大憨熊 提交于 2019-11-29 03:25:39
I am using Eclipse IDE for Java Developers Helios. I have mainly done desktop applications before but now I would like to learn about Servlets. I have installed Jetty on my computer. And I wrote a simple Servlet in Java using Eclipse. But how do I compile it and export it to a war file in Eclipse? I have found some tutorials doing it with Ant, but I would like to do it native in Eclipse if possible. Here is my Servlet: package org.jonas; // some imports from java.io, java.servlet and java.servlet.http public class MyServlet extends HttpServlet { public void doGet(HttpServletRequest request,

Tomcat failing to deploy .war

女生的网名这么多〃 提交于 2019-11-29 03:15:35
I'm trying to follow this tutorial on creating a simple REST web service, however I get to deploying it on tomcat and it throws an exception: FAIL - Application at context path /restful could not be started FAIL - Encountered exception org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/restful]] I've looked around for a solution and found this question and this one and they make me think that it's a servlet-mapping problem however I'm not sure how to fix it! Here is my log file: 18/12/2012 9:57:16 AM org.apache

Server is not connected when trying to deploy with intellij

孤街醉人 提交于 2019-11-28 23:08:59
I am trying to build, deploy and debug my webapp inside intellij. I have setup my tomcat using this answer and I was able to get the server running. The issue is that my webapp is not being deployed, though it is defined in the deployment tab. I am getting the following error: server is not connected. Deploy is not available If I copy the war and start the server everything works Ok. With ports 8080 and 8000. What am I doing wrong? Just in case it is somehow related, the project is build with Maven & Spring I added the Run/Debug Configuration for the Server: Server Tab Deployment Tab Debug

How to include dependencies in WAR file?

左心房为你撑大大i 提交于 2019-11-28 21:36:47
I have a Dynamic Web Project in Eclipse which has a dependency to another Java project in my workspace. When running the web project in the build-in Tomcat server, I've added the project dependency to the class path in the run configuration . I would like to create a WAR for deploying the web project on an external server. The dependency Java project is added to the Java Build path in Eclipse, but when I export an WAR-file the library is not included. The Java project is also selected in the Order and Export . How can I create a WAR with where my dependencies are included? Maven multimodule

create a .war file from gwt-project

无人久伴 提交于 2019-11-28 21:11:33
How do I create a .war-file from my gwt-project in eclipse? I always use Ant build file, so the project gets compiled and packaged as a war with one click. Add an xml-file to your project with the following content: <project name="test" basedir="." default="default"> <property name="src.dir" value="src" /> <property name="build.dir" value="war" /> <path id="compile.classpath"> <fileset dir="${build.dir}/WEB-INF/lib"> <include name="**/*.jar" /> <include name="**/*.xml" /> </fileset> </path> <target name="default" depends="gwtc, buildwar,deploy"> </target> <target name="gwtc" description="GWT

How to extract .war files in java? ZIP vs JAR

a 夏天 提交于 2019-11-28 19:06:49
I have a web program where I want the user to be able to import a .war file and I can extract certain files out of the .war file. I have found two class libraries: java.util.zip.* and java.util.jar.* . From what I understand, a WAR file is a special JAR file which is a special ZIP file. So would it be better to use java.util.jar ? If ZIP and JAR files are pretty much the same why is there a need for two different libraries? If you look at the JarFile API you'll see that it's a subclass of the ZipFile class. The jar-specific classes mostly just add jar-specific functionality, like direct

In maven - how to rename the output .war file based on the name of the profile in use

北城余情 提交于 2019-11-28 17:49:45
I have three profiles in my pom.xml for our application... dev (for use on a developer's) qa (for use on our internal qa server) prod (production). When we run our maven build all three profiles ouput a war file with the same name. I would like to output $profilename-somearbitraryname.war Any ideas? Tomasz Nurkiewicz You've answered yourself correctly: <profiles> <profile> <id>dev</id> <properties> <rp.build.warname>dev</rp.build.warname> </properties> </profile> <profile> <id>qa</id> <properties> <rp.build.warname>qa</rp.build.warname> </properties> </profile> <profile> <id>prod</id>