war

EJB explanation regarding EAR vs WAR

╄→гoц情女王★ 提交于 2019-12-18 11:10:22
问题 I have just begun reading up on EJBs. Even as I venture into it I have a few questions based on what I have heard about them. Do applications using EJBs always have to be deployed as an EAR? Can applications containing EJBs be deployed just like other other java web projects using ECLIPSE and without using ANT? 回答1: 1.Do applications using ejb's always have to be deployed as EAR ? No. The EJB module is assembled into a JAR, lets call it myapp-ejb.jar as a naming convention. This contains the

Update Jenkins from a war file

大兔子大兔子 提交于 2019-12-18 10:17:45
问题 I have a machine with Ubuntu 12.04 and have installed Jenkins ver. 1.424.6 using apt-get based on this guide , but there is a new version: New version of Jenkins (1.447.2) is available for download (changelog). If I press download, I get a jenkins.war file... but how do I use that for upgrading my current installation? or is that not possible before the apt repositories gets updated? 回答1: You can overwrite the existing jenkins.war file with the new one and then restart Jenkins. This file is

JAR vs WAR file specification

笑着哭i 提交于 2019-12-18 09:04:31
问题 I noticed that WAR files are supposed to have classes/ and lib/ directories for containing their classfile root and dependencies, respectively. I also noticed that it is not common practice for JARs to contain such a lib/ directory and to contain their own dependencies. So now I'm wondering why JARs shouldn't/usually-don't contain their own dependencies, but WAR files are expected to. Unless I'm missing something, both require their dependencies to be on the classpath at runtime (JARs won't

Intellij and Apache Tomcat not updating

走远了吗. 提交于 2019-12-18 07:23:08
问题 I have a project going on for a couple of months now using a Spring MVC framework. For developing I am using an Apache Tomcat 8.0.17 with an exploded war file. Everything worked well since yesterday. Now when I change my Java Files the changes are no longer visible. I can even throw runtime exceptions and stuff like that (I always restart the tomcat server). The only way to "update" my code is to rebuild the whole project (Build --> Rebuild Project) which is quite time consuming and very

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

我与影子孤独终老i 提交于 2019-12-18 04:48:05
问题 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

Define contextroot inside WAR file

非 Y 不嫁゛ 提交于 2019-12-18 04:03:43
问题 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. 回答1: Create WEB-INF/ibm-web-ext.xml with these contents: <web-ext xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://websphere

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

前提是你 提交于 2019-12-18 03:56:16
问题 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

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

♀尐吖头ヾ 提交于 2019-12-18 03:56:07
问题 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

Tomcat 7.0.35 set HTTP response header Content-Type charset for static HTML files

非 Y 不嫁゛ 提交于 2019-12-18 02:49:25
问题 I am serving some static HTML files and a servlet all in a single war file from a standalone Tomcat 7.0.35 server using the HTTP Connector. I want to specify the charset of all the static HTML files by setting the HTTP response header Content-Type=text/html;charset=UTF-8 . Tomcat by default serves HTML files with Content-Type=text/html (no charset portion). I followed the instructions at: http://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q8 But the header still contains Content-Type=text

How to include dependencies in WAR file?

柔情痞子 提交于 2019-12-18 01:12:14
问题 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