war

Using GlassFish <class-loader delegate=“false” /> in WAR of EAR causes ClassNotFoundExceptions on JARs in WAR

雨燕双飞 提交于 2019-12-10 22:56:10
问题 The problem: I'm doing maintenance/enhancement work on a project using an old (2.0.3) version of Mojarra, and recently hit a bug. Updating Mojarra corrects the problem. Unfortunately, updating Mojarra on the production Glassfish server isn't an option; a whole bunch of applications in production are on that server, and there is no possible way our QA department would be able to check all of them for regression errors. The proposed solution: Deploy Mojarra with just this application, I've

Jetty How to re-deploy war

断了今生、忘了曾经 提交于 2019-12-10 22:37:50
问题 Now I have read Jetty docs http://wiki.eclipse.org/Jetty/Tutorial/Embedding_Jetty#Setting_a_Web_Application_Context . But there are no info about how to make code with hot re-deploy of the war file with scanInterval. It must re-deploy war file if it changed. How to code this? 回答1: For hot deploy you need to deploy the webapp with the deployment manager and the webapp or context provider. http://wiki.eclipse.org/Jetty/Feature/Hot_Deployment the xml shown there (and in the distribution in the

How can I use maven to include classes from a sibling module in a jar?

China☆狼群 提交于 2019-12-10 19:35:41
问题 I have Maven project with a parent module and two children: Service and API . The Service module is a WAR and contains all of the source files for the project, while the API module exists purely to build a jar containing a subset of classes from the Service module, and to deploy that jar to a local maven repo. I've tried a combo of the maven-dependency-plugin and the maven-assembly-plugin to copy over the Service war and include it in the deployed API JAR, but I'm struggling to find a way to

Maven Could not resolve dependencies (Return code is: 409 , ReasonPhrase:Conflict)

匆匆过客 提交于 2019-12-10 17:17:18
问题 Failed to execute goal on project lcms.web: Could not resolve dependencies for project lcms:lcms.web:war:0.0.1-SNAPSHOT: Failed to collect dependencies for [junit:junit:jar:4.9 (test), org.springframework:spring-web:jar:4.2.4.RELEASE (compile), org.springframework:spring-webmvc:jar:4.2.4.RELEASE (compile), commons-logging:commons-logging:jar:1.1.1 (compile), org.springframework.security:spring-security-web:jar:4.0.3.RELEASE (compile), org.springframework.security:spring-security-config:jar:4

Gradle: Run multiple webapps with Jetty

爱⌒轻易说出口 提交于 2019-12-10 16:44:22
问题 I want to run two webapps created by the same Gradle project into a Jetty server. Let's call these two webapps "ninja" and "warrior". Both webapps are very similar, they only differ in the application-context file (referenced in the web.xml file) and resources. In order to deploy them, these two options are accepted: Use different ports: http://www.example.com:8080/app (ninja webapp) http://www.example.com:8081/app (warrior webapp) Use different paths: http://www.example.com:8080/ninja_app

Docker tomcat edit expanded war files

白昼怎懂夜的黑 提交于 2019-12-10 15:59:11
问题 I am using docker to deploy a tomcat container running a third party war file. My Dockerfile looks something like this FROM tomcat:7-jre8 ADD my.war ${CATALINA_HOME}/webapps/my.war When I run the container tomcat expands my war at runtime and I can happily access my app at http://my.ip.addr:8080/mywar/ . However my problem is that I want to edit a couple of the config files within the war . I don't really want to unpack and repack the war file as that seems messy and hard to maintain. I was

Running Scripts in a Sprint Boot Web Application

混江龙づ霸主 提交于 2019-12-10 15:08:53
问题 I have a Spring Boot web application packaged as a WAR file and I wish to have the ability to run some tasks (scripts or commands) on-demand. For example: Initialize the database schema Seed the database programmatically Data migration when required for new versions of the application (move files, database operations, etc.) Validate data integrity between stored files and database contents These "commands" would be much easier to implement if they had access to the same beans (services, DAOs)

Programmatically reading static resources from my java webapp [duplicate]

若如初见. 提交于 2019-12-10 13:52:18
问题 This question already has answers here : How to find the working folder of a servlet based application in order to load resources (3 answers) Closed 3 years ago . I currently have a bunch of images in my .war file like this. WAR-ROOT -WEB-INF -IMAGES -image1.jpg -image2.jpg -index.html When I generate html via my servlets/jsp/etc I can simple link to http://host/contextroot/IMAGES/image1.jpg and http://host/contextroot/IMAGES/image1.jpg Not I am writing a servlet that needs to get a

Copy a file during maven build phase

元气小坏坏 提交于 2019-12-10 13:29:39
问题 My situation is: I have a Maven project, I have my java classes in /app/src/main/java , my resources in /app/src/main/resources and my webapp files in /app/src/main/webapp I have a javascript file in /common/script.js Now what I want is to include (copy) the javascript file to the war file during the build phase of maven. To be precise, I want the script.js to land in /js/ directory of the war archive, just as it was placed in /app/src/main/webapp/js before starting the build. I need this to

Building a war on intellij

独自空忆成欢 提交于 2019-12-10 12:32:28
问题 I have a Java EE project I have imported into IntelliJ . I can compile the project but for some reason not able to build a war artifact , when I go to the build tab the <build artifacts> option is blanked out ( ie I cannot select it ) . my project compiles fine but I am still confused on how I could build my war . 回答1: Operating sequence can be such (dependent of IDE version): Choose: File -> Project Structure -> Artifacts Then press Alt + Insert and create new artifact: After this actions