Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question

Deploy web application using PU directory structure

I'm trying to deploy web application using PU directory structure instead of WAR file. But I haven't got any success. Is there an example explaining where everything needs to be?



{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=2759]{quote}

asked 2008-12-10 18:43:49 -0600

noiseba gravatar image

updated 2013-08-08 09:52:00 -0600

jaissefsfex gravatar image
edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

You can either deploy the war file zipped or exploded (in which case you
should put it in the deploy directory on the GSM machine), but to be
deployed as a web application it needs to have the standard war file
directory structure (specifically, contain WEB-INF/web.xml). Otherwise
the deployment mechanism will identify it as a web application.


answered 2008-12-11 02:29:19 -0600

uri gravatar image
edit flag offensive delete link more


OK. So I'm trying to deploy an exploded application. Here is the error I'm getting:

java.lang.ClassNotFoundException: org.mortbay.jetty.plus.webapp.EnvConfiguration

I've added Jetty jars in lib/jetty to setenv.sh and gs.sh. I tried add the jars to WEB-INF/lib. Either worked. I was only once successful at deploying a WAR file via the UI. It's quite frustrating.

noiseba gravatar imagenoiseba ( 2008-12-11 16:19:03 -0600 )edit

Here is an exploded folder structure I'm using:

├───META-INF └───WEB-INF ├───classes │ ├───META-INF │ └───org │ └───springframework │ └───samples │ └───petclinic │ ├───aspects │ ├───gigaspaces │ ├───util │ ├───validation │ └───web ├───jsp └───shared-lib


shay hassidim gravatar imageshay hassidim ( 2008-12-11 16:36:58 -0600 )edit

Thanks Shay. That worked.

I have another question though. I tried deploying two web applications to the same machine. Gigaspaces automatically deployed the second application on a different port. Can I deploy both applications on the same port just like how I can deploy two war files in Tomcat and run them on the same port?



noiseba gravatar imagenoiseba ( 2008-12-17 18:13:41 -0600 )edit

Another question: Which META-INF directory should jetty.pu.xml be in? There are two of them. I can only make it work in WEB-INF/classes/META-INF/spring. Although I'm not positive about it because I configured the web port to be 8081 but the application was still deployed on 8080.



noiseba gravatar imagenoiseba ( 2008-12-17 19:16:39 -0600 )edit



"In order to configure a custom Jetty configuration, a jetty.pu.xml
should be added to META-INF/spring within the WAR file. Both the plain
and shared mode actually correspond to a built in "jetty.pu.xml" file
that exists within the OpenSpaces JAR file (explained below)."

This means the jetty.pu.xml should be located at:

/WAR FOLDER/META-INF/spring/jetty.pu.xml


shay hassidim gravatar imageshay hassidim ( 2008-12-18 06:31:49 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2008-12-10 18:43:49 -0600

Seen: 132 times

Last updated: Dec 11 '08