war

How to assemble multimodule maven project into one WAR?

青春壹個敷衍的年華 提交于 2019-11-30 05:13:06
Similar question here . I would like to get ONE resulting WAR to be deployed from 3 different maven modules. The war modules are absolutely non-conflicting : First one that has Java classes and some WEB-INF/artifacts Second one are just API - interfaces - that must be either already present in container or part of the resulting war (that's what I want) Third one with Implementation classes, WEB-INF/artifacts ( spring infrastructure, web.xml, etc) First one depends on interfaces and implementation. Third one depends on the interfaces. I have a total mess in possible options. Do I use Overlays

Access session of another web application

情到浓时终转凉″ 提交于 2019-11-30 04:37:42
问题 Is it possible to configure two separate web apps (WAR) in a J2EE application (EAR) to access a shared session context? Further info: I ended up creating a shared class from the EAR which stored the required information in static members. This did the trick, even if it seemed like a dirty hack. 回答1: Not directly. Most containers put each WAR in a separate classloader with the EAR classloader as their parent. Each app's sessions are separate. You can put something provided by the parent EAR in

Hot deploying changes with Netbeans, Maven, and Glassfish

心不动则不痛 提交于 2019-11-30 04:02:33
问题 Recently we migrated from using ant to maven. Within Netbeans, I used to edit and save html, xhtml, javascript, css files in the WAR and almost immediately the changes were available on the server. Now, when I edit and save those types of files in the WAR, nothing happens. I have to right click my EAR -> Build with dependencies -> Run to make the changes available. This process takes ages. I've found a few similar questions, but am still confused. EDIT: I just wiped my development environment

Weblogic Error 403--Forbidden

爷,独闯天下 提交于 2019-11-30 03:40:49
I am trying to run a Java EE application on weblogic. The application works fine on Tomcat. I have customized the war file to include weblogic.xml. This file includes the following code:- <container-descriptor> <show-archived-real-path-enabled>true</show-archived-real-path-enabled> </container-descriptor> I have also changed the configuration in properties file of the application to reflect the port on which container is listening. server.port=7001 server.modjk.enabled=false My web.xml file includes the following code:- <servlet> <servlet-name>olatservlet</servlet-name> <servlet-class>org.olat

EJB explanation regarding EAR vs WAR

无人久伴 提交于 2019-11-30 02:44:48
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.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 EJB code as well as the deployment descriptor file called ejb-jar.xml in EJB 2.x. In EJB 3.0, the code

Maven war has META-INF folder in two places

﹥>﹥吖頭↗ 提交于 2019-11-30 02:01:25
I'm working on a project which uses JAAS and unfortunately for me Tomcat requires a file to be put in a META-INF folder in the root of the war app.war |__META-INF | |___context.xml ... I think that it's already weird since the default META-INF location for WAR's is in the classes folders. app.war |__WEB-INF | |__classes | |__META-INF ... So I'm using Maven, which states that anything in src/main/resources/META-INF will be copied to the appropriate place, which it does. The weird thing is that it is also creating a META-INF folder in the root of the file structure leaving me with 2 META-INF

Tomcat 8 integration with Maven

落花浮王杯 提交于 2019-11-30 02:00:14
It sounds like Eclipse (Kepler) does not have a proper plugin for Tomcat 8. I want to deploy my .war into Tomcat 8 and run it by Maven pom.xml file. Can anyone provide me step-by-step guidance or any resources, please? My POM file: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>Test-App</groupId> <artifactId>test-rest</artifactId> <packaging>war</packaging> <version>0.0.1-SNAPSHOT</version> <name

In Maven, how output the classpath being used?

五迷三道 提交于 2019-11-29 23:33:31
For my current purposes I have a Maven project which creates a war file, and I want to see what actual classpath it is using when creating the war . Is there a way to do that in a single command -- without having to compile the entire project? One idea is to have Maven generate the target/classpath.properties file and then stop at that point. To get the classpath all by itself in a file, you can: mvn dependency:build-classpath -Dmdep.outputFile=cp.txt Or add this to the POM.XML: <project> [...] <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency

Linux command for extracting war file?

眉间皱痕 提交于 2019-11-29 22:00:12
How can I extract a .war file with Linux command prompt? Jigar Joshi 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 Or jar xvf myproject.war 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 Tomcat will take care of extracting/installing the war file. You can use the unzip command. 来源: https:/

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

放肆的年华 提交于 2019-11-29 20:29:13
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/LoginExample-1.0.war</fileName> </configuration> </plugin> To my pom.xml and import again as maven project,