war

Serve a jar file from within a war file (as a resource)

I have a web app: MyApp.war, inside it, I have a jar file: WEB-INF/lib/PublicJar.jar I want client applications to be able to download that jar like a web resource. e.g http://theserver.com/myapp/jars/PublicJar.jar I want the web application to be able to compute the hashcode of the jar file to see if it has changed, so clients know i...

Jar within War - NoClassDefFound Exception

Hi All, I have deployed 2 apps as app1.war and app2.war on jboss. These two apps use a common java package, say, myPackage. Earlier my wars looked like this ======================================================================== app[12].war/ -----web.xml -----app specific classes (.class files like) -----appClass1.class -----appCl...

JBoss WAR Deployment problem (caching problems?)

Hey, I'm trying to deploy my war file on JBoss 4.2.3. This application was working fine and still is working fine (sans the bugfix that I've put into my code). I have made a new war file with a bug fix in it (which involves passing some extra http request params while requesting another app's servlet). However, when I tried to deploy th...

Hudson continuous integration server: how to see Windows mapped directories that are visible to Ant?

Using Hudson, Ant 1.7, Tomcat 6.20, JDK 1.6 and JDK 1.5; all on Windows boxes. My Ant build script for a WAR file uses JARs stored on a remote server. The directory path to the remote server is mapped as a network drive in Windows. A build.properties file is used to specify the paths to the JAR dependencies. When building with Ant, e...

Ignore SVN files when exporting a WAR file from Eclipse?

I have a Dynamic Web Project in Eclipse. I can pack it to a WAR by right-clicking the project and choosing Export > WAR File. This creates the WAR file as expected and it works. The problem is that Eclipse includes all the .svn folders of the project into the WAR file. Is there a way to tell Eclipse to ignore .svn folders in the WAR ex...

How can i determine which servlet spec version a java WAR file uses?

I've got a WAR that i need to deploy with TomCat, but i'm not sure which version of the servlet spec the WAR file uses. According to apache's site (http://tomcat.apache.org/whichversion.html) i need to download a different version according to which spec the WAR file uses. Is there any way to tell by unzipping the WAR file and looking ...

War file deployment

I wrote a jsp application, and if I generate a war file with eclipse in windows XP, language: tradition Chinese. and deploy to weblogic, it will have such problem: inputAdministrator.jsp:251:11: This type name is ambiguous because it matches more than one '*'-import, including 'java.io.*' and 'admin.iguard.businessObject.*'. ...

How to use deployment variables when building WAR files in Eclipse?

I have a workspace with several projects, that may be deployed in several configurations. When exporting to WAR from within Eclipse, i would like to specify the configuration, and have several properties in some configuration files exported to change according to that configuration - the context path attribute of the context.xml, the na...

Having Trouble Generating a War in Grails

I'm getting the following error when I try to build a war in Grails. Any thoughts on what could be causing the issue? Any tips on debugging the Groovy scripts that are building the war? [web] $ cmd.exe /C D:\dev\tools\grails-1.1\bin\grails.bat war cloudfi.war && exit %%ERRORLEVEL%% Welcome to Grails 1.1 - http://grails.org/ Licensed u...

When is it appropriate to use an EAR and when should your apps be in WARs?

We have many Spring web applications to make on a WebLogic server and are curious about when WARs should go in an EAR and when they should just exist as WARs. Occassionally, the WARs will need to access common logic JARs, but I don't see why these would need to go into an EAR when they could just be packaged into the WARs. From what I u...

what software can help me to unwar a war file and get the java source code within it ?

what software can help me to unwar a war file and get the java source code within it ? ...

What causes the "FAIL - Deploy Upload Failed, Exception: null" error message in tomcat?

What causes the "FAIL - Deploy Upload Failed, Exception: null" error message in tomcat? I'm trying to deploy a war to tomcat from the manager but when I try to upload I get the error FAIL - Deploy Upload Failed, Exception: null with the following error message in the log SEVERE: HTMLManager: FAIL - Deploy Upload Failed, Exception: n...

Are there reasons to place a dependency in a web server's lib directory instead of including it in the War file?

If I have an dependency Jar for my application is it better to place it in the war files lib directory or to place it in the global application server (like Tomcat) lib directory? What do I gain by using one approach over another? Diskspace springs to mind, but we live in a time when diskspace is cheap. Is there a memory usage differenc...

What's the benefit of deploying a war file instead of an exploded directory?

I'm configuring an installer for our product which, up until now, was distributed as a war file, usually on tomcat. Once tomcat has exploded the directory, the user has to open a properties file and set their database connection information. I'd like the installer to do this (we're using install4j) but there doesn't seem to be a built-in...

How to merge wars into one?

In our company, we have a number different modules constructed as separate wars. Each client can pick and choose module he wishes to buy. Since all modules share same session, security context etc, it makes sense to merge them into a single war. Is it possible to automate this process? For example, it should merge web.xml, calculate e...

"Error invoking method check" when deploying a WAR on Tomcat

Hi folks, When I deploy my WAR generated with Ant on my local system (copy/paste under /webapps), everything works fine. The thing is, when I deploy the WAR on a remote server for test purposes, I got this error message: There was an error thrown by Tomcat during deployment: "Error invoking method check". This however may not mean ...

ANT_ Generated .war files using .java or .html

HI, Want to Generate .WAR file from .java / .html ...

Maven WAR plugin not reading configuration when running in <execution> tag

I'm trying to get Maven to perform several executions with the WAR plugin. It works fine as long as it's defined in the following way: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>1.0</version> <configuration> (...) </configuration> But not in the followi...

How do you unwar a .war file with ant on windows?

I'm only remotely familiar with what ant does, but apparently I have to setup a service that's run on jboss and put it into a deploy directory... the problem is the .war file -- I only have winzip 7zip and ant and I dont know how to ge the contentsa out of the .war file to put it in the deploy directory... are there other conf and buil...

how to obtain the relative path of a resource in a j2ee project

I have a Dynamic Web Project having a flat file (or say text file). I have created a servlet in which I need to use this file. My code is as following: protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // String resource = request.getParameter ("json") ; ...