-
1. Re: Create plugin for a web application
loopix Dec 28, 2007 10:17 PM (in response to loopix)EDIT: is there any way to do a "addServlet()" in a Web Application (.war, from a servlet for example ...) using JBoss application server ???
-
2. Re: Create plugin for a web application
jaikiran Dec 29, 2007 6:28 AM (in response to loopix)My web application is packaged into a war file wich is also packaged into an ear archive. So, I want to make the base of the plateform into an EAR file and add somes .jar files to a specific directories.
You might want to have a look at http://wiki.jboss.org/wiki/Wiki.jsp?page=ExplodedDeployment. This way, your EAR and WAR files can be deployed as normal folders and you can dynamically put content in that folder. -
3. Re: Create plugin for a web application
loopix Dec 29, 2007 9:59 AM (in response to loopix)Yes, thanks
I think I have no choice and must follow this way. But, I got a last question:
Is it possible, for a web application already deployed, to modify itself ?
I say that because I will need to update web.xml or application.xml with that application, so JBoss will re-deploy the archive and then ... the application will stop, but ... what's happen if this application has not finish the modification on itself ???? Crash ? ... -
4. Re: Create plugin for a web application
jaikiran Jan 2, 2008 11:07 AM (in response to loopix)If you change a jsp file in your web application then you dont have to do anything. The change will be automatically picked up. However if you change a class file then you will have to touch the web.xml for the application to be redeployed
-
5. Re: Create plugin for a web application
loopix Jan 2, 2008 4:37 PM (in response to loopix)Ok, thanks very much, now I'm on the good road :)
So, my last idea is:
- a plugin will be a .war file (it's easy to develop it on Eclipse, separately)
- the web application base will load a directories with .war files
- a .war files is unpackaged and will be a part of "web_plugin.war" modules (exploded archive) which is empty at the start of the application (first time or not, ...)
So, I got 2 web modules:
- web_base
- web_plugin
the second module will be filled by all files contained into .war files on a specific directories .. I think that idea must work, but actually, I must open a gived WAR file .. unpack it, copy files to web_plugin.war and update the application (if needed). All of that work must be hardcoded in Java, so ... first: try to deploy a helloworld plugin which contains only a html page ...
For now, don't know how to open a .war files with a .war application :D -
6. Re: Create plugin for a web application
jaikiran Jan 3, 2008 10:37 AM (in response to loopix)"loopix" wrote:
For now, don't know how to open a .war files with a .war application :D
Look at the APIs available in java.util.zip.ZipFile http://java.sun.com/j2se/1.4.2/docs/api/java/util/zip/ZipFile.html -
7. Re: Create plugin for a web application
loopix Jan 3, 2008 5:11 PM (in response to loopix)Great :)
I will take a look, now