war

Spring Boot packaging the project to War

依然范特西╮ 提交于 2019-12-25 11:57:07
问题 I have followed these steps to convert the pacakging from Jar to War. But when i check my project folder or the build folder that is generated there is no war file generated only a war folder comes with MANIFEST.MF file http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#build-tool-plugins-gradle-packaging The changes i did in my gradle build file apply plugin: 'war' configurations { providedRuntime } dependencies { providedRuntime('org.springframework.boot:spring-boot

Webapp behaves as expected when run from eclipse while when exported as war fails

懵懂的女人 提交于 2019-12-25 08:17:52
问题 This has been driving me nuts. So I have a (very simple vanilla servlet 3) web app. When I run it in eclipse all is fine. Among others I am able to register an account with Unicode (greek) username and then log in as site admin and visit the user's profile alright. When I export war to $CATALINA_HOME\webapps , launch $CATALINA_HOME\bin\startup.bat , open the site in the browser, login as admin and try to visit the user profile the username etc display as blank. The files in ...\apache-tomcat

Which jars needs to be present in WEB-INF\lib and in .classpath

假如想象 提交于 2019-12-25 08:07:17
问题 I am converting a regular J2EE application to use Maven. I was able to successfully convert to Maven and I am getting successful "mvn deploy". The issue is facing after deploying the ear to WAS. I am getting SRVE0203E :Servlet [action] org.apache.struts.action.ActionServlet is missing another required class. I had similar problems for different application and after trying couple of "exclusion" of jars I was able to deploy the application successfully in WAS. I have following question. How

Autowiring fails, when jars are loaded as per skinny war concept where classes involved have default accessors

荒凉一梦 提交于 2019-12-25 07:58:34
问题 Our application is based on skinny war concept( http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.html ). . |-- META-INF | `-- application.xml |-- lib | -- core application jars | -- spring jars | -- common jar |-- war1-1.0.0.war | --war1-jar1-1.0.0.jar `-- war2-1.0.0.war | --war2-jar1-1.0.0.jar We have spring jars and other core application jars loaded at application level. The common jar and the core application jars have their own applicationContext.xml. Also the wars

Can't deploy Grails War file in tomcat - results in 404

倖福魔咒の 提交于 2019-12-25 06:26:08
问题 I have a GrailsApplication.war file with me, and i added that into the webapps folder (tomcat 7). When i tried to access the url ( <ipaddress>:8080/GrailsApplication ) it gives me a 404 error. What have i done wrong deploying the grails war file ? Grails version : 2.2.4 Tomcat : 7 Server : Ubuntu 回答1: In Grails 2 apps, there should be a config setting present in Config.groovy as below, verify if that is present: environments { production { grails.serverURL = "http://<youripaddress>:8080/$

How create file and put it in a war with Maven?

雨燕双飞 提交于 2019-12-25 04:57:06
问题 How I can create file and put it in a war with Maven when building the war? 回答1: Maven builds a war by executing the war goal of the maven-war plugin. Have a look at the configuration parameters of this goal at http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html. Basically, warSourceDirectory (defaulting to ${basedir}/src/main/webapp) contains the files that go to the war, apart from your java code and resources. Fine tune with packagingIncludes/packagingExcludes. To include file(s

How to make a war file auto deploy?

狂风中的少年 提交于 2019-12-25 04:24:32
问题 How do you make a war file auto deploy? The server component is glassfish and the database is created in MySQL. Do I need to create an executable file that will extract the war file? and how to do it so? 回答1: It should be sufficient to copy/move your WAR file to the following folder: $GLASSFISH_HOME/glassfish/domains/domain1/autodeploy (You may change the domain name if you are using a different one.) See also: How to to autodeploy war file with GlassFish WAR doesn't get redeployed in

After deploying war file in Tomcat api not working

我们两清 提交于 2019-12-25 03:45:09
问题 I'm trying to deploy app in my local tomcat but have some problems. I use: Tomcat 9, Spring boot, ReactJS and Webpack. When I run embedded Tomcat (in Eclipse) all be ok - API working good, but when I build war file and paste it to my local Tomcat - API not working, all request failed. How I build war file: run mvn "clean install"; paste war file to my local Tomcat directory "webapps"; wait for deploying; go to "http://localhost:8080/web_importer/#/importCandidates". But in this moment when i

grails war tomcat with external config file

拈花ヽ惹草 提交于 2019-12-25 02:03:36
问题 I want to add external config data. So I added in the main Config.groovy file the following line. I exported the environment variable DASH_CONFIG=<path_to_external_configfile>/extConfig.properties extConfig.properties simpleBSMDash.default.serverName = "test.it.com" simpleBSMDash.default.refreshInterval = "5" Config.groovy if(System.getenv('DASH_CONFIG')) { println( "Including configuration file: " + System.getenv('DASH_CONFIG')); grails.config.locations = [ "classpath:exthConfig.properties",

How to find the parent directory of a deployed Java EE application?

混江龙づ霸主 提交于 2019-12-24 17:22:44
问题 I have a Java EE project that I will turn into a war file. When it runs, it will generate a log file, I would like the file to be generated at the same parent directory as the war file. For example, my war file is: C:\project.war then my log file's path would be: C:\log.txt But all I found was how to find resources inside the project. How can I find the parent directory of my project before it generates a log file? 回答1: You should not rely on paths like this. The WAR that you create may get