war

Excude all the unnecessary jar from war file

点点圈 提交于 2019-12-12 18:37:14
问题 I am a grails programmer and I want to remove the unnecessary jar files that are included in the war file. There are so many unnecessary jar files included in the war file. Is there any quick solution to do so? Also can you mention the jar files which are necessary to make and run the simple grails war. 回答1: You can exclude unnecessary jar from war by adding following lines in BuildConfig.groovy. grails.war.resources = { stagingDir -> delete(file:"${stagingDir}/WEB-INF/lib/jarFileName.jar") }

Eclipse including Java source code files with class files in WAR

早过忘川 提交于 2019-12-12 18:34:19
问题 When I choose the option to export my dynamic web project in Eclipse (Juno) as a WAR file, all of the .java files are being deployed to WEB-INF/classes along with the .class files. I've never noticed this happening before, so I was wondering what I needed to do to stop this from happening. 回答1: I could not reproduce this on Juno, however I noticed there is a checkbox named "Export source files" I assume you have it unchecked, but if not, then this might be it. 来源: https://stackoverflow.com

Google App Engine: Downloading Source: Could not find or load main class com.google.appengine.tools.admin.AppCfg

独自空忆成欢 提交于 2019-12-12 18:12:35
问题 I'm an owner on a project and I would like to pull down the war on GAE. Through Cygwin, when I try to do this: ./appengine-java-sdk/bin/appcfg.sh download_app -A sampleapp -V I get the following error: Error: Could not find or load main class com.google.appengine.tools.admin.AppCfg I suspect that this might be because I am behind a corporate firewall, but I have already configured my cygwin to reroute through a proxy. Does anyone have other suggestions as to what might be the cause? 回答1: This

GWT 1.6 project war layout- mixing source code & compiler-generated artifacts?

烂漫一生 提交于 2019-12-12 17:31:12
问题 Having just wrapped up a GWT-1.5 based project, I'm taking a look at what we'll have to do to migrate to 1.6. I'm very surprised to see that GWT seems to want to write its compiled output to the war directory, where you would normally have items under source control. What's the reason behind this? Did Google really think this was a good idea? Is there a workaround to keep source code separate from compiler-generated artifacts? Is there some other reason for this that I'm missing? EDIT : It's

Geoserver generate web archive file

一个人想着一个人 提交于 2019-12-12 14:10:00
问题 I'm doing some changes in Geoserver source. I used quick start guide from here. I done all steps in guide and it works fine. When I run as java project with web-app/org.geoserver.web/start.java file , It works fine. But I want to produce war file similar to geoserver.war in geoserver releases. I didn't find any documentation or example about it. 回答1: I solved the problem with geoserver developer manual.There wasn't a spesific topic but thanks to geoserver developer Jody Garnett ,I found this

Java Application using Https Connection:“Connection refused error”

时间秒杀一切 提交于 2019-12-12 10:06:58
问题 I have created a jar for my JavaAppliaction.From this application I am connecting to servlet (I am passing name and password from swing to servlet) in the WebApplicaton(here I am just displaying name and password in the servlet). I am passing data over SSL connection(Https). It is working fine in my system.But when I tried to run jar in another system I am getting “Connection refused error”. Note:Running jar in another system which passes data over http connection is working fine. I have gone

Maven project build into jar and war

痴心易碎 提交于 2019-12-12 05:47:18
问题 I have a project with the following pom.xml and I have removed some of the unwanted stuff from it. What I intended to happen was to generate a jar file and ultimately generate a war package that includes the jar file as a library. Unfortunately, this doesn't seem to be happening with the following pom.xml . <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/xsd

Logj4 is not loaded if application is deployed as a war archive

时光怂恿深爱的人放手 提交于 2019-12-12 05:42:24
问题 I have a Tomcat 6 server with a lot of web application directories and I have set up Log4J. It works for all application directories which are not deployed via a war file. The current configuration looks like this: /tomcat/lib/log4j.properties # Define all the appenders log4j.appender.root=org.apache.log4j.RollingFileAppender log4j.appender.root.File=${catalina.base}/logs/tomcat.log log4j.appender.root.Append=true log4j.appender.root.MaxFileSize=1MB log4j.appender.root.MaxBackupIndex=5 log4j

Does ServletContext.getRealPath() work with web fragments?

孤者浪人 提交于 2019-12-12 05:33:35
问题 I use web fragments (servlet 3 spec) and thus can load e.g. META-INF/resources/access.xml file which is in a library in /WEB-INF/lib/ of my WAR via ServletContext.getResourceAsStream("access.xml") . Doing the same with ServletContext.getRealPath("access.xml") doesn't work (=> null ). The spec states: The getRealPath method takes a String argument and returns a String representation of a file on the local file system to which a path corresponds. Resources inside the META-INF/resources

Persistence Unit Service starting multille times

a 夏天 提交于 2019-12-12 04:59:07
问题 I am having EAR project which contains 1 EJB 3.0 Project and 2 WAR Project. I have defined persistence.xml in my EJB project. However when the application starts it starts persistence unit service 3 times. As per log on startup I can see Starting Persistence Unit Service 'xyz-ear.ear/xyz-ejb-1_0_0-SNAPSHOT.jar#xyzUnit' Starting Persistence Unit Service 'xyz-ear.ear/xyz-war-1_0_0-SNAPSHOT.war#xyzUnit' Starting Persistence Unit Service 'xyz-ear.ear/xyz-service-war-1_0_0-SNAPSHOT.war#xyzUnit'