You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Paul Spencer <pa...@apache.org> on 2015/09/15 14:34:04 UTC

How to edit web page source files without redeploying the bundle?

(Karaf 3.0.3 and Pax Web)
I am developing webpages that are include in a bundle.  My current workflow, which seems wrong, is as follows:

1) Edit the web source files (.jspx,.html,.css,...)
2) Rebuild the bundle
3) Copy the bundle to Karaf's deploy directory
4) Test the changes

I know there is a better way and I am open to suggestions.  

Paul Spencer

 

Re: How to edit web page source files without redeploying the bundle?

Posted by Paul Spencer <pa...@apache.org>.
Ryan
The bundle is being reloaded every time a file is changed.  This is not
helpful when correcting a type-o or other display element by editing .xhtml
file after logged in and navigating "n" pages into the site.

Paul Spencer



--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-edit-web-page-source-files-without-redeploying-the-bundle-tp4042592p4042755.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: How to edit web page source files without redeploying the bundle?

Posted by Ryan Moquin <fr...@gmail.com>.
If you have your web.xml specifying development for the face let parameter
(I think it is), then jsf should automatically pick up any xhtml changes
automatically, unless the xhtml bundle is getting copied to a cache folder
in the karaf data folder (I'd venture to say it is if you need to touch the
manifest.mf), if that's the case, see where it is in the karaf data dir and
modify the xhtml/resources there and then they should get auto picked up...
obviously not optimal, but may be better......

Hopefully that helps.

Ryan

On Sat, Sep 19, 2015, 1:54 AM Achim Nierbeck <bc...@googlemail.com>
wrote:

> Hi Paul,
>
> guess not, file-install is scanning for updates and it'll trigger an
> update of the bundle allas a re-deploy
> therefore any session information is gone.
>
> regards, Achim
>
>
> 2015-09-19 0:35 GMT+02:00 Paul Spencer <pa...@apache.org>:
>
>> Achim,
>> I did notice updating an .xhtml files in WEB-INF/template caused the web
>> server to be restarted.  As a result my http session was lost and I had to
>> log back in the web server.  Is there a way to prevent the restarting when
>> text files, like .xhtml, are changed?
>>
>> Paul Spencer
>>
>>
>>
>> --
>> View this message in context:
>> http://karaf.922171.n3.nabble.com/How-to-edit-web-page-source-files-without-redeploying-the-bundle-tp4042592p4042679.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>
>
>
> --
>
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>
> Software Architect / Project Manager / Scrum Master
>
>

Re: How to edit web page source files without redeploying the bundle?

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi Paul,

guess not, file-install is scanning for updates and it'll trigger an update
of the bundle allas a re-deploy
therefore any session information is gone.

regards, Achim


2015-09-19 0:35 GMT+02:00 Paul Spencer <pa...@apache.org>:

> Achim,
> I did notice updating an .xhtml files in WEB-INF/template caused the web
> server to be restarted.  As a result my http session was lost and I had to
> log back in the web server.  Is there a way to prevent the restarting when
> text files, like .xhtml, are changed?
>
> Paul Spencer
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/How-to-edit-web-page-source-files-without-redeploying-the-bundle-tp4042592p4042679.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: How to edit web page source files without redeploying the bundle?

Posted by Paul Spencer <pa...@apache.org>.
Achim,
I did notice updating an .xhtml files in WEB-INF/template caused the web
server to be restarted.  As a result my http session was lost and I had to
log back in the web server.  Is there a way to prevent the restarting when
text files, like .xhtml, are changed?

Paul Spencer



--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-edit-web-page-source-files-without-redeploying-the-bundle-tp4042592p4042679.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: How to edit web page source files without redeploying the bundle?

Posted by Achim Nierbeck <bc...@googlemail.com>.
Glad you made it.
If you update one of the "resources" in that directory keep in mind to
touch the MANIFEST.MF so
an update is triggered.

regards, Achim

2015-09-18 14:07 GMT+02:00 Paul Spencer <pa...@apache.org>:

> Achim,
>
> Success!
>
> Now that I know that Karaf will not explode the file it works.
>
> From the Maven project's directory, I copy the webappDirectory to the
> Karaf deploy directory using the following command.
>    cp --recursive target/my-awesome-1.0.0-SNAPSHOT/*
> ${KARAF_HOME}/deploy/my-awesome-1.0.0-SNAPSHOT.war
>
> I did need to copy the MANIFEST.MF from WEB-INF/classes/META-INF/*
> META-INF so Karaf would correctly load the bundle.
>
>
> Thank you for your help and patients.
>
> Paul Spencer
>
>
> > On Sep 18, 2015, at 2:58 AM, Achim Nierbeck <bc...@googlemail.com>
> wrote:
> >
> > Hi Paul,
> >
> > I might have expressed myself wrong, you just need to extract your war
> or jar to a directory called the same way including the extension.
> > So if you want to deploy the my-so-awesome-1.0.0-SNAPSHOT.war as an
> exploded war extract this war in the following directoy:
> >
> > $KARAF_HOME/deploy/my-so-awesome-1.0.0-SNAPSHOT.war
> >
> > the directory structure of this "exploded" war should look exactly like
> the content of the war itself.
> >
> > regards, Achim
> >
> >
> > 2015-09-18 2:30 GMT+02:00 Paul Spencer <pa...@apache.org>:
> > Achim,
> > Still no success. For my-awesome-1.0.0-SNAPSHOT.war with a context path
> of /my-context I have tried the following:
> >
> > 1) Created the directories below and placed
> my-awesome-1.0.0-SNAPSHOT.war in deploy
> >   deploy/my-awesome.war
> >   my-awesome/my-context.war
> >
> > 2) Created the directories below and installed the bundle using
> "bundle:install mvn:foo/my-awesome/1.0.0-SNAPSHOT.war"
> >   deploy/my-awesome.war
> >   deploy/my-awesome-1.0.0-SNAPSHOT.war
> >   my-awesome/my-context.war
> >
> > I have also tried a similar configuration for a jar bundle containing
> business logic. In all cases an "ls -lR" only listed the empty directories
> I created.
> >
> > Ideality I would like to put a sample project on GitHub, but at the
> moment I do not have the spare time.
> >
> > Paul Spencer
> >
> > > On Sep 16, 2015, at 4:16 PM, Achim Nierbeck <bc...@googlemail.com>
> wrote:
> > >
> > > hmm,
> > >
> > > actually it's more like
> > > if your artifact is called - my-awesome.war or my-awesome.jar you need
> to have a folder called my-awesome.jar/.war in the deploy folder.
> > > Make sure you have a valid manifest in it that makes clear it's wab
> application (Web-ContextPath).
> > > To trigger an "update" of this bundle you'll need to edit the manifest
> file.
> > >
> > > regards, Achim
> > >
> > >
> > > 2015-09-16 19:47 GMT+02:00 Paul Spencer <pa...@apache.org>:
> > > Achim,
> > > I have created the deploy/war, deploy/jar, and deploy/war/jar but the
> .war file is not expanding.  I went so far as removing the .war from the
> deploy directory, restarting karaf, and copying the .war in the deploy
> directory. Outside of the default configuration, is additional
> configuration or are additional bundles required?
> > >
> > > ***
> > > * Currently installed features
> > > ***
> > >
> > > karaf@localhost()> feature:list -i
> > > Name                   | Version         | Installed | Repository
>          | Description
> > >
> ------------------------------------------------------------------------------------------------------------------------------------
> > > transaction            | 1.1.1           | x         |
> enterprise-3.0.3         | OSGi Transaction Manager
> > > jndi                   | 3.0.3           | x         |
> enterprise-3.0.3         | OSGi Service Registry JNDI access
> > > jdbc                   | 3.0.3           | x         |
> enterprise-3.0.3         | JDBC service and commands
> > > standard               | 3.0.3           | x         | standard-3.0.3
>          | Karaf standard feature
> > > config                 | 3.0.3           | x         | standard-3.0.3
>          | Provide OSGi ConfigAdmin support
> > > region                 | 3.0.3           | x         | standard-3.0.3
>          | Provide Region Support
> > > package                | 3.0.3           | x         | standard-3.0.3
>          | Package commands and mbeans
> > > http                   | 3.0.3           | x         | standard-3.0.3
>          | Implementation of the OSGI HTTP Service
> > > http-whiteboard        | 3.0.3           | x         | standard-3.0.3
>          | Provide HTTP Whiteboard pattern support
> > > war                    | 3.0.3           | x         | standard-3.0.3
>          | Turn Karaf as a full WebContainer
> > > kar                    | 3.0.3           | x         | standard-3.0.3
>          | Provide KAR (KARaf archive) support
> > > ssh                    | 3.0.3           | x         | standard-3.0.3
>          | Provide a SSHd server on Karaf
> > > management             | 3.0.3           | x         | standard-3.0.3
>          | Provide a JMX MBeanServer and a set of MBeans in K
> > > scr                    | 3.0.3           | x         | standard-3.0.3
>          | Declarative Service support
> > > pax-cdi                | 0.11.0          | x         |
> org.ops4j.pax.cdi-0.11.0 | Provide CDI support
> > > cxf-specs              | 3.0.2           | x         | cxf-3.0.2
>           |
> > > cxf-core               | 3.0.2           | x         | cxf-3.0.2
>           |
> > > cxf-wsdl               | 3.0.2           | x         | cxf-3.0.2
>           |
> > > cxf-http               | 3.0.2           | x         | cxf-3.0.2
>           |
> > > cxf-bindings-soap      | 3.0.2           | x         | cxf-3.0.2
>           |
> > > cxf-jaxws              | 3.0.2           | x         | cxf-3.0.2
>           |
> > > cxf-databinding-jaxb   | 3.0.2           | x         | cxf-3.0.2
>           |
> > > pax-jetty              | 9.0.7.v20131107 | x         |
> org.ops4j.pax.web-4.0.2  | Provide Jetty engine support
> > > pax-http               | 4.0.2           | x         |
> org.ops4j.pax.web-4.0.2  | Implementation of the OSGI HTTP Service
> > > pax-http-whiteboard    | 4.0.2           | x         |
> org.ops4j.pax.web-4.0.2  | Provide HTTP Whiteboard pattern support
> > > pax-war                | 4.0.2           | x         |
> org.ops4j.pax.web-4.0.2  | Provide support of a full WebContainer
> > > karaf@localhost()>
> > >
> > >
> > > Paul Spencer
> > >
> > > > On Sep 15, 2015, at 2:52 PM, Achim Nierbeck <bc...@googlemail.com>
> wrote:
> > > >
> > > > Hi Paul,
> > > >
> > > > sorry I missed the JSF part.
> > > > an exploded war/jar in the deploy folder should work/was supposed to
> be working.
> > > > So option a) should work for you. Just create a war/jar directory in
> the deploy folder and work on your stuff there.
> > > >
> > > > b) is only partially similar, you miss the step of doing the copying
> yourself and the deployment/update is done automatic.
> > > >
> > > > c) yeah forget about that one, as it's only for static resources.
> > > >
> > > > regards, achim
> > > >
> > > >
> > > > 2015-09-15 20:20 GMT+02:00 Paul Spencer <pa...@apache.org>:
> > > > Achim,
> > > > My bundle is a war the uses MyFaces, PrimeFaces, database, and
> business logic bundles, so you options are not working for me.  The Jetty
> documentation[1] reference the MANIFEST property "Jetty-bundleInstall" and
> "mostly useful for those OSGi frameworks that unpack bundles by default."
> > > >
> > > > Can PAX-WEB be configured to "unpack bundles by default"?  If so,
> how do I define the directory the war is unpacked into?
> > > >
> > > > Why options did not work for me:
> > > > a - Does not work because the Imported-Package defined in the bundle
> are not used or displayed by bundle:header
> > > > b - Similar to my current workflow.
> > > > c - Same as failure as "a".  I was able to see the files, but the
> classpath was missing JSF and other bundles.
> > > >   ** Added the following to etc/jetty.xml and exploded war in to
> /tmp/foo
> > > >   <Get name="handler">
> > > >       <Call name="addHandler">
> > > >           <Arg>
> > > >               <New
> class="org.eclipse.jetty.servlet.ServletContextHandler">
> > > >                   <Set name="contextPath">/foo</Set>
> > > >                   <Set name="resourceBase">/tmp/foo</Set>
> > > >                   <Call name="addServlet">
> > > >
>  <Arg>org.eclipse.jetty.servlet.DefaultServlet</Arg>
> > > >                       <Arg>/</Arg>
> > > >                   </Call>
> > > >               </New>
> > > >           </Arg>
> > > >       </Call>
> > > >   </Get>
> > > >
> > > >
> > > >
> > > > Paul Spencer
> > > >
> > > >
> > > > [1]
> http://www.eclipse.org/jetty/documentation/9.0.6.v20130930/framework-jetty-osgi.html#d0e15965
> > > >
> > > >
> > > >
> > > > > On Sep 15, 2015, at 10:12 AM, Achim Nierbeck <
> bcanhome@googlemail.com> wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > you have a couple of different possibilities:
> > > > >
> > > > > a) Use an exploded WAR in the deploy folder
> > > > > b) build your bundle with maven and have karaf listening to it via
> bundle:watch
> > > > > c) make sure you have an extra handler configured in the jetty.xml
> which serves the static content from a fileystem [1]
> > > > >
> > > > > regards, Achim
> > > > >
> > > > > [1] -
> http://ops4j.github.io/pax/web/SNAPSHOT/#_advanced_jetty_configuration
> > > > >
> > > > >
> > > > > 2015-09-15 14:34 GMT+02:00 Paul Spencer <pa...@apache.org>:
> > > > > (Karaf 3.0.3 and Pax Web)
> > > > > I am developing webpages that are include in a bundle.  My current
> workflow, which seems wrong, is as follows:
> > > > >
> > > > > 1) Edit the web source files (.jspx,.html,.css,...)
> > > > > 2) Rebuild the bundle
> > > > > 3) Copy the bundle to Karaf's deploy directory
> > > > > 4) Test the changes
> > > > >
> > > > > I know there is a better way and I am open to suggestions.
> > > > >
> > > > > Paul Spencer
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > >
> > > > > Apache Member
> > > > > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> > > > > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
> Committer & Project Lead
> > > > > blog <http://notizblog.nierbeck.de/>
> > > > > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> > > > >
> > > > > Software Architect / Project Manager / Scrum Master
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > Apache Member
> > > > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> > > > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
> Committer & Project Lead
> > > > blog <http://notizblog.nierbeck.de/>
> > > > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> > > >
> > > > Software Architect / Project Manager / Scrum Master
> > > >
> > >
> > >
> > >
> > >
> > > --
> > >
> > > Apache Member
> > > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> > > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
> Committer & Project Lead
> > > blog <http://notizblog.nierbeck.de/>
> > > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> > >
> > > Software Architect / Project Manager / Scrum Master
> > >
> >
> >
> >
> >
> > --
> >
> > Apache Member
> > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
> & Project Lead
> > blog <http://notizblog.nierbeck.de/>
> > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> >
> > Software Architect / Project Manager / Scrum Master
> >
>
>


-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: How to edit web page source files without redeploying the bundle?

Posted by Paul Spencer <pa...@apache.org>.
Achim,

Success!

Now that I know that Karaf will not explode the file it works.

From the Maven project's directory, I copy the webappDirectory to the Karaf deploy directory using the following command.
   cp --recursive target/my-awesome-1.0.0-SNAPSHOT/* ${KARAF_HOME}/deploy/my-awesome-1.0.0-SNAPSHOT.war

I did need to copy the MANIFEST.MF from WEB-INF/classes/META-INF/* META-INF so Karaf would correctly load the bundle.  


Thank you for your help and patients.

Paul Spencer


> On Sep 18, 2015, at 2:58 AM, Achim Nierbeck <bc...@googlemail.com> wrote:
> 
> Hi Paul, 
> 
> I might have expressed myself wrong, you just need to extract your war or jar to a directory called the same way including the extension. 
> So if you want to deploy the my-so-awesome-1.0.0-SNAPSHOT.war as an exploded war extract this war in the following directoy: 
> 
> $KARAF_HOME/deploy/my-so-awesome-1.0.0-SNAPSHOT.war 
> 
> the directory structure of this "exploded" war should look exactly like the content of the war itself. 
> 
> regards, Achim 
> 
> 
> 2015-09-18 2:30 GMT+02:00 Paul Spencer <pa...@apache.org>:
> Achim,
> Still no success. For my-awesome-1.0.0-SNAPSHOT.war with a context path of /my-context I have tried the following:
> 
> 1) Created the directories below and placed my-awesome-1.0.0-SNAPSHOT.war in deploy
>   deploy/my-awesome.war
>   my-awesome/my-context.war
> 
> 2) Created the directories below and installed the bundle using "bundle:install mvn:foo/my-awesome/1.0.0-SNAPSHOT.war"
>   deploy/my-awesome.war
>   deploy/my-awesome-1.0.0-SNAPSHOT.war
>   my-awesome/my-context.war
> 
> I have also tried a similar configuration for a jar bundle containing business logic. In all cases an "ls -lR" only listed the empty directories I created.
> 
> Ideality I would like to put a sample project on GitHub, but at the moment I do not have the spare time.
> 
> Paul Spencer
> 
> > On Sep 16, 2015, at 4:16 PM, Achim Nierbeck <bc...@googlemail.com> wrote:
> >
> > hmm,
> >
> > actually it's more like
> > if your artifact is called - my-awesome.war or my-awesome.jar you need to have a folder called my-awesome.jar/.war in the deploy folder.
> > Make sure you have a valid manifest in it that makes clear it's wab application (Web-ContextPath).
> > To trigger an "update" of this bundle you'll need to edit the manifest file.
> >
> > regards, Achim
> >
> >
> > 2015-09-16 19:47 GMT+02:00 Paul Spencer <pa...@apache.org>:
> > Achim,
> > I have created the deploy/war, deploy/jar, and deploy/war/jar but the .war file is not expanding.  I went so far as removing the .war from the deploy directory, restarting karaf, and copying the .war in the deploy directory. Outside of the default configuration, is additional configuration or are additional bundles required?
> >
> > ***
> > * Currently installed features
> > ***
> >
> > karaf@localhost()> feature:list -i
> > Name                   | Version         | Installed | Repository               | Description
> > ------------------------------------------------------------------------------------------------------------------------------------
> > transaction            | 1.1.1           | x         | enterprise-3.0.3         | OSGi Transaction Manager
> > jndi                   | 3.0.3           | x         | enterprise-3.0.3         | OSGi Service Registry JNDI access
> > jdbc                   | 3.0.3           | x         | enterprise-3.0.3         | JDBC service and commands
> > standard               | 3.0.3           | x         | standard-3.0.3           | Karaf standard feature
> > config                 | 3.0.3           | x         | standard-3.0.3           | Provide OSGi ConfigAdmin support
> > region                 | 3.0.3           | x         | standard-3.0.3           | Provide Region Support
> > package                | 3.0.3           | x         | standard-3.0.3           | Package commands and mbeans
> > http                   | 3.0.3           | x         | standard-3.0.3           | Implementation of the OSGI HTTP Service
> > http-whiteboard        | 3.0.3           | x         | standard-3.0.3           | Provide HTTP Whiteboard pattern support
> > war                    | 3.0.3           | x         | standard-3.0.3           | Turn Karaf as a full WebContainer
> > kar                    | 3.0.3           | x         | standard-3.0.3           | Provide KAR (KARaf archive) support
> > ssh                    | 3.0.3           | x         | standard-3.0.3           | Provide a SSHd server on Karaf
> > management             | 3.0.3           | x         | standard-3.0.3           | Provide a JMX MBeanServer and a set of MBeans in K
> > scr                    | 3.0.3           | x         | standard-3.0.3           | Declarative Service support
> > pax-cdi                | 0.11.0          | x         | org.ops4j.pax.cdi-0.11.0 | Provide CDI support
> > cxf-specs              | 3.0.2           | x         | cxf-3.0.2                |
> > cxf-core               | 3.0.2           | x         | cxf-3.0.2                |
> > cxf-wsdl               | 3.0.2           | x         | cxf-3.0.2                |
> > cxf-http               | 3.0.2           | x         | cxf-3.0.2                |
> > cxf-bindings-soap      | 3.0.2           | x         | cxf-3.0.2                |
> > cxf-jaxws              | 3.0.2           | x         | cxf-3.0.2                |
> > cxf-databinding-jaxb   | 3.0.2           | x         | cxf-3.0.2                |
> > pax-jetty              | 9.0.7.v20131107 | x         | org.ops4j.pax.web-4.0.2  | Provide Jetty engine support
> > pax-http               | 4.0.2           | x         | org.ops4j.pax.web-4.0.2  | Implementation of the OSGI HTTP Service
> > pax-http-whiteboard    | 4.0.2           | x         | org.ops4j.pax.web-4.0.2  | Provide HTTP Whiteboard pattern support
> > pax-war                | 4.0.2           | x         | org.ops4j.pax.web-4.0.2  | Provide support of a full WebContainer
> > karaf@localhost()>
> >
> >
> > Paul Spencer
> >
> > > On Sep 15, 2015, at 2:52 PM, Achim Nierbeck <bc...@googlemail.com> wrote:
> > >
> > > Hi Paul,
> > >
> > > sorry I missed the JSF part.
> > > an exploded war/jar in the deploy folder should work/was supposed to be working.
> > > So option a) should work for you. Just create a war/jar directory in the deploy folder and work on your stuff there.
> > >
> > > b) is only partially similar, you miss the step of doing the copying yourself and the deployment/update is done automatic.
> > >
> > > c) yeah forget about that one, as it's only for static resources.
> > >
> > > regards, achim
> > >
> > >
> > > 2015-09-15 20:20 GMT+02:00 Paul Spencer <pa...@apache.org>:
> > > Achim,
> > > My bundle is a war the uses MyFaces, PrimeFaces, database, and business logic bundles, so you options are not working for me.  The Jetty documentation[1] reference the MANIFEST property "Jetty-bundleInstall" and "mostly useful for those OSGi frameworks that unpack bundles by default."
> > >
> > > Can PAX-WEB be configured to "unpack bundles by default"?  If so, how do I define the directory the war is unpacked into?
> > >
> > > Why options did not work for me:
> > > a - Does not work because the Imported-Package defined in the bundle are not used or displayed by bundle:header
> > > b - Similar to my current workflow.
> > > c - Same as failure as "a".  I was able to see the files, but the classpath was missing JSF and other bundles.
> > >   ** Added the following to etc/jetty.xml and exploded war in to /tmp/foo
> > >   <Get name="handler">
> > >       <Call name="addHandler">
> > >           <Arg>
> > >               <New class="org.eclipse.jetty.servlet.ServletContextHandler">
> > >                   <Set name="contextPath">/foo</Set>
> > >                   <Set name="resourceBase">/tmp/foo</Set>
> > >                   <Call name="addServlet">
> > >                       <Arg>org.eclipse.jetty.servlet.DefaultServlet</Arg>
> > >                       <Arg>/</Arg>
> > >                   </Call>
> > >               </New>
> > >           </Arg>
> > >       </Call>
> > >   </Get>
> > >
> > >
> > >
> > > Paul Spencer
> > >
> > >
> > > [1]http://www.eclipse.org/jetty/documentation/9.0.6.v20130930/framework-jetty-osgi.html#d0e15965
> > >
> > >
> > >
> > > > On Sep 15, 2015, at 10:12 AM, Achim Nierbeck <bc...@googlemail.com> wrote:
> > > >
> > > > Hi,
> > > >
> > > > you have a couple of different possibilities:
> > > >
> > > > a) Use an exploded WAR in the deploy folder
> > > > b) build your bundle with maven and have karaf listening to it via bundle:watch
> > > > c) make sure you have an extra handler configured in the jetty.xml which serves the static content from a fileystem [1]
> > > >
> > > > regards, Achim
> > > >
> > > > [1] - http://ops4j.github.io/pax/web/SNAPSHOT/#_advanced_jetty_configuration
> > > >
> > > >
> > > > 2015-09-15 14:34 GMT+02:00 Paul Spencer <pa...@apache.org>:
> > > > (Karaf 3.0.3 and Pax Web)
> > > > I am developing webpages that are include in a bundle.  My current workflow, which seems wrong, is as follows:
> > > >
> > > > 1) Edit the web source files (.jspx,.html,.css,...)
> > > > 2) Rebuild the bundle
> > > > 3) Copy the bundle to Karaf's deploy directory
> > > > 4) Test the changes
> > > >
> > > > I know there is a better way and I am open to suggestions.
> > > >
> > > > Paul Spencer
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > Apache Member
> > > > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> > > > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead
> > > > blog <http://notizblog.nierbeck.de/>
> > > > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> > > >
> > > > Software Architect / Project Manager / Scrum Master
> > > >
> > >
> > >
> > >
> > >
> > > --
> > >
> > > Apache Member
> > > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> > > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead
> > > blog <http://notizblog.nierbeck.de/>
> > > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> > >
> > > Software Architect / Project Manager / Scrum Master
> > >
> >
> >
> >
> >
> > --
> >
> > Apache Member
> > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead
> > blog <http://notizblog.nierbeck.de/>
> > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> >
> > Software Architect / Project Manager / Scrum Master
> >
> 
> 
> 
> 
> -- 
> 
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> 
> Software Architect / Project Manager / Scrum Master 
> 


Re: How to edit web page source files without redeploying the bundle?

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi Paul,

I might have expressed myself wrong, you just need to extract your war or
jar to a directory called the same way including the extension.
So if you want to deploy the my-so-awesome-1.0.0-SNAPSHOT.war as an
exploded war extract this war in the following directoy:

$KARAF_HOME/deploy/my-so-awesome-1.0.0-SNAPSHOT.war

the directory structure of this "exploded" war should look exactly like the
content of the war itself.

regards, Achim


2015-09-18 2:30 GMT+02:00 Paul Spencer <pa...@apache.org>:

> Achim,
> Still no success. For my-awesome-1.0.0-SNAPSHOT.war with a context path of
> /my-context I have tried the following:
>
> 1) Created the directories below and placed my-awesome-1.0.0-SNAPSHOT.war
> in deploy
>   deploy/my-awesome.war
>   my-awesome/my-context.war
>
> 2) Created the directories below and installed the bundle using
> "bundle:install mvn:foo/my-awesome/1.0.0-SNAPSHOT.war"
>   deploy/my-awesome.war
>   deploy/my-awesome-1.0.0-SNAPSHOT.war
>   my-awesome/my-context.war
>
> I have also tried a similar configuration for a jar bundle containing
> business logic. In all cases an "ls -lR" only listed the empty directories
> I created.
>
> Ideality I would like to put a sample project on GitHub, but at the moment
> I do not have the spare time.
>
> Paul Spencer
>
> > On Sep 16, 2015, at 4:16 PM, Achim Nierbeck <bc...@googlemail.com>
> wrote:
> >
> > hmm,
> >
> > actually it's more like
> > if your artifact is called - my-awesome.war or my-awesome.jar you need
> to have a folder called my-awesome.jar/.war in the deploy folder.
> > Make sure you have a valid manifest in it that makes clear it's wab
> application (Web-ContextPath).
> > To trigger an "update" of this bundle you'll need to edit the manifest
> file.
> >
> > regards, Achim
> >
> >
> > 2015-09-16 19:47 GMT+02:00 Paul Spencer <pa...@apache.org>:
> > Achim,
> > I have created the deploy/war, deploy/jar, and deploy/war/jar but the
> .war file is not expanding.  I went so far as removing the .war from the
> deploy directory, restarting karaf, and copying the .war in the deploy
> directory. Outside of the default configuration, is additional
> configuration or are additional bundles required?
> >
> > ***
> > * Currently installed features
> > ***
> >
> > karaf@localhost()> feature:list -i
> > Name                   | Version         | Installed | Repository
>        | Description
> >
> ------------------------------------------------------------------------------------------------------------------------------------
> > transaction            | 1.1.1           | x         | enterprise-3.0.3
>        | OSGi Transaction Manager
> > jndi                   | 3.0.3           | x         | enterprise-3.0.3
>        | OSGi Service Registry JNDI access
> > jdbc                   | 3.0.3           | x         | enterprise-3.0.3
>        | JDBC service and commands
> > standard               | 3.0.3           | x         | standard-3.0.3
>        | Karaf standard feature
> > config                 | 3.0.3           | x         | standard-3.0.3
>        | Provide OSGi ConfigAdmin support
> > region                 | 3.0.3           | x         | standard-3.0.3
>        | Provide Region Support
> > package                | 3.0.3           | x         | standard-3.0.3
>        | Package commands and mbeans
> > http                   | 3.0.3           | x         | standard-3.0.3
>        | Implementation of the OSGI HTTP Service
> > http-whiteboard        | 3.0.3           | x         | standard-3.0.3
>        | Provide HTTP Whiteboard pattern support
> > war                    | 3.0.3           | x         | standard-3.0.3
>        | Turn Karaf as a full WebContainer
> > kar                    | 3.0.3           | x         | standard-3.0.3
>        | Provide KAR (KARaf archive) support
> > ssh                    | 3.0.3           | x         | standard-3.0.3
>        | Provide a SSHd server on Karaf
> > management             | 3.0.3           | x         | standard-3.0.3
>        | Provide a JMX MBeanServer and a set of MBeans in K
> > scr                    | 3.0.3           | x         | standard-3.0.3
>        | Declarative Service support
> > pax-cdi                | 0.11.0          | x         |
> org.ops4j.pax.cdi-0.11.0 | Provide CDI support
> > cxf-specs              | 3.0.2           | x         | cxf-3.0.2
>         |
> > cxf-core               | 3.0.2           | x         | cxf-3.0.2
>         |
> > cxf-wsdl               | 3.0.2           | x         | cxf-3.0.2
>         |
> > cxf-http               | 3.0.2           | x         | cxf-3.0.2
>         |
> > cxf-bindings-soap      | 3.0.2           | x         | cxf-3.0.2
>         |
> > cxf-jaxws              | 3.0.2           | x         | cxf-3.0.2
>         |
> > cxf-databinding-jaxb   | 3.0.2           | x         | cxf-3.0.2
>         |
> > pax-jetty              | 9.0.7.v20131107 | x         |
> org.ops4j.pax.web-4.0.2  | Provide Jetty engine support
> > pax-http               | 4.0.2           | x         |
> org.ops4j.pax.web-4.0.2  | Implementation of the OSGI HTTP Service
> > pax-http-whiteboard    | 4.0.2           | x         |
> org.ops4j.pax.web-4.0.2  | Provide HTTP Whiteboard pattern support
> > pax-war                | 4.0.2           | x         |
> org.ops4j.pax.web-4.0.2  | Provide support of a full WebContainer
> > karaf@localhost()>
> >
> >
> > Paul Spencer
> >
> > > On Sep 15, 2015, at 2:52 PM, Achim Nierbeck <bc...@googlemail.com>
> wrote:
> > >
> > > Hi Paul,
> > >
> > > sorry I missed the JSF part.
> > > an exploded war/jar in the deploy folder should work/was supposed to
> be working.
> > > So option a) should work for you. Just create a war/jar directory in
> the deploy folder and work on your stuff there.
> > >
> > > b) is only partially similar, you miss the step of doing the copying
> yourself and the deployment/update is done automatic.
> > >
> > > c) yeah forget about that one, as it's only for static resources.
> > >
> > > regards, achim
> > >
> > >
> > > 2015-09-15 20:20 GMT+02:00 Paul Spencer <pa...@apache.org>:
> > > Achim,
> > > My bundle is a war the uses MyFaces, PrimeFaces, database, and
> business logic bundles, so you options are not working for me.  The Jetty
> documentation[1] reference the MANIFEST property "Jetty-bundleInstall" and
> "mostly useful for those OSGi frameworks that unpack bundles by default."
> > >
> > > Can PAX-WEB be configured to "unpack bundles by default"?  If so, how
> do I define the directory the war is unpacked into?
> > >
> > > Why options did not work for me:
> > > a - Does not work because the Imported-Package defined in the bundle
> are not used or displayed by bundle:header
> > > b - Similar to my current workflow.
> > > c - Same as failure as "a".  I was able to see the files, but the
> classpath was missing JSF and other bundles.
> > >   ** Added the following to etc/jetty.xml and exploded war in to
> /tmp/foo
> > >   <Get name="handler">
> > >       <Call name="addHandler">
> > >           <Arg>
> > >               <New
> class="org.eclipse.jetty.servlet.ServletContextHandler">
> > >                   <Set name="contextPath">/foo</Set>
> > >                   <Set name="resourceBase">/tmp/foo</Set>
> > >                   <Call name="addServlet">
> > >
>  <Arg>org.eclipse.jetty.servlet.DefaultServlet</Arg>
> > >                       <Arg>/</Arg>
> > >                   </Call>
> > >               </New>
> > >           </Arg>
> > >       </Call>
> > >   </Get>
> > >
> > >
> > >
> > > Paul Spencer
> > >
> > >
> > > [1]
> http://www.eclipse.org/jetty/documentation/9.0.6.v20130930/framework-jetty-osgi.html#d0e15965
> > >
> > >
> > >
> > > > On Sep 15, 2015, at 10:12 AM, Achim Nierbeck <
> bcanhome@googlemail.com> wrote:
> > > >
> > > > Hi,
> > > >
> > > > you have a couple of different possibilities:
> > > >
> > > > a) Use an exploded WAR in the deploy folder
> > > > b) build your bundle with maven and have karaf listening to it via
> bundle:watch
> > > > c) make sure you have an extra handler configured in the jetty.xml
> which serves the static content from a fileystem [1]
> > > >
> > > > regards, Achim
> > > >
> > > > [1] -
> http://ops4j.github.io/pax/web/SNAPSHOT/#_advanced_jetty_configuration
> > > >
> > > >
> > > > 2015-09-15 14:34 GMT+02:00 Paul Spencer <pa...@apache.org>:
> > > > (Karaf 3.0.3 and Pax Web)
> > > > I am developing webpages that are include in a bundle.  My current
> workflow, which seems wrong, is as follows:
> > > >
> > > > 1) Edit the web source files (.jspx,.html,.css,...)
> > > > 2) Rebuild the bundle
> > > > 3) Copy the bundle to Karaf's deploy directory
> > > > 4) Test the changes
> > > >
> > > > I know there is a better way and I am open to suggestions.
> > > >
> > > > Paul Spencer
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > Apache Member
> > > > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> > > > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
> Committer & Project Lead
> > > > blog <http://notizblog.nierbeck.de/>
> > > > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> > > >
> > > > Software Architect / Project Manager / Scrum Master
> > > >
> > >
> > >
> > >
> > >
> > > --
> > >
> > > Apache Member
> > > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> > > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
> Committer & Project Lead
> > > blog <http://notizblog.nierbeck.de/>
> > > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> > >
> > > Software Architect / Project Manager / Scrum Master
> > >
> >
> >
> >
> >
> > --
> >
> > Apache Member
> > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
> & Project Lead
> > blog <http://notizblog.nierbeck.de/>
> > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> >
> > Software Architect / Project Manager / Scrum Master
> >
>
>


-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: How to edit web page source files without redeploying the bundle?

Posted by Paul Spencer <pa...@apache.org>.
Achim,
Still no success. For my-awesome-1.0.0-SNAPSHOT.war with a context path of /my-context I have tried the following:

1) Created the directories below and placed my-awesome-1.0.0-SNAPSHOT.war in deploy
  deploy/my-awesome.war
  my-awesome/my-context.war

2) Created the directories below and installed the bundle using "bundle:install mvn:foo/my-awesome/1.0.0-SNAPSHOT.war"
  deploy/my-awesome.war
  deploy/my-awesome-1.0.0-SNAPSHOT.war
  my-awesome/my-context.war

I have also tried a similar configuration for a jar bundle containing business logic. In all cases an "ls -lR" only listed the empty directories I created.

Ideality I would like to put a sample project on GitHub, but at the moment I do not have the spare time.

Paul Spencer 

> On Sep 16, 2015, at 4:16 PM, Achim Nierbeck <bc...@googlemail.com> wrote:
> 
> hmm, 
> 
> actually it's more like
> if your artifact is called - my-awesome.war or my-awesome.jar you need to have a folder called my-awesome.jar/.war in the deploy folder. 
> Make sure you have a valid manifest in it that makes clear it's wab application (Web-ContextPath). 
> To trigger an "update" of this bundle you'll need to edit the manifest file. 
> 
> regards, Achim 
> 
> 
> 2015-09-16 19:47 GMT+02:00 Paul Spencer <pa...@apache.org>:
> Achim,
> I have created the deploy/war, deploy/jar, and deploy/war/jar but the .war file is not expanding.  I went so far as removing the .war from the deploy directory, restarting karaf, and copying the .war in the deploy directory. Outside of the default configuration, is additional configuration or are additional bundles required?
> 
> ***
> * Currently installed features
> ***
> 
> karaf@localhost()> feature:list -i
> Name                   | Version         | Installed | Repository               | Description
> ------------------------------------------------------------------------------------------------------------------------------------
> transaction            | 1.1.1           | x         | enterprise-3.0.3         | OSGi Transaction Manager
> jndi                   | 3.0.3           | x         | enterprise-3.0.3         | OSGi Service Registry JNDI access
> jdbc                   | 3.0.3           | x         | enterprise-3.0.3         | JDBC service and commands
> standard               | 3.0.3           | x         | standard-3.0.3           | Karaf standard feature
> config                 | 3.0.3           | x         | standard-3.0.3           | Provide OSGi ConfigAdmin support
> region                 | 3.0.3           | x         | standard-3.0.3           | Provide Region Support
> package                | 3.0.3           | x         | standard-3.0.3           | Package commands and mbeans
> http                   | 3.0.3           | x         | standard-3.0.3           | Implementation of the OSGI HTTP Service
> http-whiteboard        | 3.0.3           | x         | standard-3.0.3           | Provide HTTP Whiteboard pattern support
> war                    | 3.0.3           | x         | standard-3.0.3           | Turn Karaf as a full WebContainer
> kar                    | 3.0.3           | x         | standard-3.0.3           | Provide KAR (KARaf archive) support
> ssh                    | 3.0.3           | x         | standard-3.0.3           | Provide a SSHd server on Karaf
> management             | 3.0.3           | x         | standard-3.0.3           | Provide a JMX MBeanServer and a set of MBeans in K
> scr                    | 3.0.3           | x         | standard-3.0.3           | Declarative Service support
> pax-cdi                | 0.11.0          | x         | org.ops4j.pax.cdi-0.11.0 | Provide CDI support
> cxf-specs              | 3.0.2           | x         | cxf-3.0.2                |
> cxf-core               | 3.0.2           | x         | cxf-3.0.2                |
> cxf-wsdl               | 3.0.2           | x         | cxf-3.0.2                |
> cxf-http               | 3.0.2           | x         | cxf-3.0.2                |
> cxf-bindings-soap      | 3.0.2           | x         | cxf-3.0.2                |
> cxf-jaxws              | 3.0.2           | x         | cxf-3.0.2                |
> cxf-databinding-jaxb   | 3.0.2           | x         | cxf-3.0.2                |
> pax-jetty              | 9.0.7.v20131107 | x         | org.ops4j.pax.web-4.0.2  | Provide Jetty engine support
> pax-http               | 4.0.2           | x         | org.ops4j.pax.web-4.0.2  | Implementation of the OSGI HTTP Service
> pax-http-whiteboard    | 4.0.2           | x         | org.ops4j.pax.web-4.0.2  | Provide HTTP Whiteboard pattern support
> pax-war                | 4.0.2           | x         | org.ops4j.pax.web-4.0.2  | Provide support of a full WebContainer
> karaf@localhost()>
> 
> 
> Paul Spencer
> 
> > On Sep 15, 2015, at 2:52 PM, Achim Nierbeck <bc...@googlemail.com> wrote:
> >
> > Hi Paul,
> >
> > sorry I missed the JSF part.
> > an exploded war/jar in the deploy folder should work/was supposed to be working.
> > So option a) should work for you. Just create a war/jar directory in the deploy folder and work on your stuff there.
> >
> > b) is only partially similar, you miss the step of doing the copying yourself and the deployment/update is done automatic.
> >
> > c) yeah forget about that one, as it's only for static resources.
> >
> > regards, achim
> >
> >
> > 2015-09-15 20:20 GMT+02:00 Paul Spencer <pa...@apache.org>:
> > Achim,
> > My bundle is a war the uses MyFaces, PrimeFaces, database, and business logic bundles, so you options are not working for me.  The Jetty documentation[1] reference the MANIFEST property "Jetty-bundleInstall" and "mostly useful for those OSGi frameworks that unpack bundles by default."
> >
> > Can PAX-WEB be configured to "unpack bundles by default"?  If so, how do I define the directory the war is unpacked into?
> >
> > Why options did not work for me:
> > a - Does not work because the Imported-Package defined in the bundle are not used or displayed by bundle:header
> > b - Similar to my current workflow.
> > c - Same as failure as "a".  I was able to see the files, but the classpath was missing JSF and other bundles.
> >   ** Added the following to etc/jetty.xml and exploded war in to /tmp/foo
> >   <Get name="handler">
> >       <Call name="addHandler">
> >           <Arg>
> >               <New class="org.eclipse.jetty.servlet.ServletContextHandler">
> >                   <Set name="contextPath">/foo</Set>
> >                   <Set name="resourceBase">/tmp/foo</Set>
> >                   <Call name="addServlet">
> >                       <Arg>org.eclipse.jetty.servlet.DefaultServlet</Arg>
> >                       <Arg>/</Arg>
> >                   </Call>
> >               </New>
> >           </Arg>
> >       </Call>
> >   </Get>
> >
> >
> >
> > Paul Spencer
> >
> >
> > [1]http://www.eclipse.org/jetty/documentation/9.0.6.v20130930/framework-jetty-osgi.html#d0e15965
> >
> >
> >
> > > On Sep 15, 2015, at 10:12 AM, Achim Nierbeck <bc...@googlemail.com> wrote:
> > >
> > > Hi,
> > >
> > > you have a couple of different possibilities:
> > >
> > > a) Use an exploded WAR in the deploy folder
> > > b) build your bundle with maven and have karaf listening to it via bundle:watch
> > > c) make sure you have an extra handler configured in the jetty.xml which serves the static content from a fileystem [1]
> > >
> > > regards, Achim
> > >
> > > [1] - http://ops4j.github.io/pax/web/SNAPSHOT/#_advanced_jetty_configuration
> > >
> > >
> > > 2015-09-15 14:34 GMT+02:00 Paul Spencer <pa...@apache.org>:
> > > (Karaf 3.0.3 and Pax Web)
> > > I am developing webpages that are include in a bundle.  My current workflow, which seems wrong, is as follows:
> > >
> > > 1) Edit the web source files (.jspx,.html,.css,...)
> > > 2) Rebuild the bundle
> > > 3) Copy the bundle to Karaf's deploy directory
> > > 4) Test the changes
> > >
> > > I know there is a better way and I am open to suggestions.
> > >
> > > Paul Spencer
> > >
> > >
> > >
> > >
> > >
> > > --
> > >
> > > Apache Member
> > > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> > > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead
> > > blog <http://notizblog.nierbeck.de/>
> > > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> > >
> > > Software Architect / Project Manager / Scrum Master
> > >
> >
> >
> >
> >
> > --
> >
> > Apache Member
> > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead
> > blog <http://notizblog.nierbeck.de/>
> > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> >
> > Software Architect / Project Manager / Scrum Master
> >
> 
> 
> 
> 
> -- 
> 
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> 
> Software Architect / Project Manager / Scrum Master 
> 


Re: How to edit web page source files without redeploying the bundle?

Posted by Achim Nierbeck <bc...@googlemail.com>.
hmm,

actually it's more like
if your artifact is called - my-awesome.war or my-awesome.jar you need to
have a folder called my-awesome.jar/.war in the deploy folder.
Make sure you have a valid manifest in it that makes clear it's wab
application (Web-ContextPath).
To trigger an "update" of this bundle you'll need to edit the manifest
file.

regards, Achim


2015-09-16 19:47 GMT+02:00 Paul Spencer <pa...@apache.org>:

> Achim,
> I have created the deploy/war, deploy/jar, and deploy/war/jar but the .war
> file is not expanding.  I went so far as removing the .war from the deploy
> directory, restarting karaf, and copying the .war in the deploy directory.
> Outside of the default configuration, is additional configuration or are
> additional bundles required?
>
> ***
> * Currently installed features
> ***
>
> karaf@localhost()> feature:list -i
> Name                   | Version         | Installed | Repository
>      | Description
>
> ------------------------------------------------------------------------------------------------------------------------------------
> transaction            | 1.1.1           | x         | enterprise-3.0.3
>      | OSGi Transaction Manager
> jndi                   | 3.0.3           | x         | enterprise-3.0.3
>      | OSGi Service Registry JNDI access
> jdbc                   | 3.0.3           | x         | enterprise-3.0.3
>      | JDBC service and commands
> standard               | 3.0.3           | x         | standard-3.0.3
>      | Karaf standard feature
> config                 | 3.0.3           | x         | standard-3.0.3
>      | Provide OSGi ConfigAdmin support
> region                 | 3.0.3           | x         | standard-3.0.3
>      | Provide Region Support
> package                | 3.0.3           | x         | standard-3.0.3
>      | Package commands and mbeans
> http                   | 3.0.3           | x         | standard-3.0.3
>      | Implementation of the OSGI HTTP Service
> http-whiteboard        | 3.0.3           | x         | standard-3.0.3
>      | Provide HTTP Whiteboard pattern support
> war                    | 3.0.3           | x         | standard-3.0.3
>      | Turn Karaf as a full WebContainer
> kar                    | 3.0.3           | x         | standard-3.0.3
>      | Provide KAR (KARaf archive) support
> ssh                    | 3.0.3           | x         | standard-3.0.3
>      | Provide a SSHd server on Karaf
> management             | 3.0.3           | x         | standard-3.0.3
>      | Provide a JMX MBeanServer and a set of MBeans in K
> scr                    | 3.0.3           | x         | standard-3.0.3
>      | Declarative Service support
> pax-cdi                | 0.11.0          | x         |
> org.ops4j.pax.cdi-0.11.0 | Provide CDI support
> cxf-specs              | 3.0.2           | x         | cxf-3.0.2
>       |
> cxf-core               | 3.0.2           | x         | cxf-3.0.2
>       |
> cxf-wsdl               | 3.0.2           | x         | cxf-3.0.2
>       |
> cxf-http               | 3.0.2           | x         | cxf-3.0.2
>       |
> cxf-bindings-soap      | 3.0.2           | x         | cxf-3.0.2
>       |
> cxf-jaxws              | 3.0.2           | x         | cxf-3.0.2
>       |
> cxf-databinding-jaxb   | 3.0.2           | x         | cxf-3.0.2
>       |
> pax-jetty              | 9.0.7.v20131107 | x         |
> org.ops4j.pax.web-4.0.2  | Provide Jetty engine support
> pax-http               | 4.0.2           | x         |
> org.ops4j.pax.web-4.0.2  | Implementation of the OSGI HTTP Service
> pax-http-whiteboard    | 4.0.2           | x         |
> org.ops4j.pax.web-4.0.2  | Provide HTTP Whiteboard pattern support
> pax-war                | 4.0.2           | x         |
> org.ops4j.pax.web-4.0.2  | Provide support of a full WebContainer
> karaf@localhost()>
>
>
> Paul Spencer
>
> > On Sep 15, 2015, at 2:52 PM, Achim Nierbeck <bc...@googlemail.com>
> wrote:
> >
> > Hi Paul,
> >
> > sorry I missed the JSF part.
> > an exploded war/jar in the deploy folder should work/was supposed to be
> working.
> > So option a) should work for you. Just create a war/jar directory in the
> deploy folder and work on your stuff there.
> >
> > b) is only partially similar, you miss the step of doing the copying
> yourself and the deployment/update is done automatic.
> >
> > c) yeah forget about that one, as it's only for static resources.
> >
> > regards, achim
> >
> >
> > 2015-09-15 20:20 GMT+02:00 Paul Spencer <pa...@apache.org>:
> > Achim,
> > My bundle is a war the uses MyFaces, PrimeFaces, database, and business
> logic bundles, so you options are not working for me.  The Jetty
> documentation[1] reference the MANIFEST property "Jetty-bundleInstall" and
> "mostly useful for those OSGi frameworks that unpack bundles by default."
> >
> > Can PAX-WEB be configured to "unpack bundles by default"?  If so, how do
> I define the directory the war is unpacked into?
> >
> > Why options did not work for me:
> > a - Does not work because the Imported-Package defined in the bundle are
> not used or displayed by bundle:header
> > b - Similar to my current workflow.
> > c - Same as failure as "a".  I was able to see the files, but the
> classpath was missing JSF and other bundles.
> >   ** Added the following to etc/jetty.xml and exploded war in to /tmp/foo
> >   <Get name="handler">
> >       <Call name="addHandler">
> >           <Arg>
> >               <New
> class="org.eclipse.jetty.servlet.ServletContextHandler">
> >                   <Set name="contextPath">/foo</Set>
> >                   <Set name="resourceBase">/tmp/foo</Set>
> >                   <Call name="addServlet">
> >                       <Arg>org.eclipse.jetty.servlet.DefaultServlet</Arg>
> >                       <Arg>/</Arg>
> >                   </Call>
> >               </New>
> >           </Arg>
> >       </Call>
> >   </Get>
> >
> >
> >
> > Paul Spencer
> >
> >
> > [1]
> http://www.eclipse.org/jetty/documentation/9.0.6.v20130930/framework-jetty-osgi.html#d0e15965
> >
> >
> >
> > > On Sep 15, 2015, at 10:12 AM, Achim Nierbeck <bc...@googlemail.com>
> wrote:
> > >
> > > Hi,
> > >
> > > you have a couple of different possibilities:
> > >
> > > a) Use an exploded WAR in the deploy folder
> > > b) build your bundle with maven and have karaf listening to it via
> bundle:watch
> > > c) make sure you have an extra handler configured in the jetty.xml
> which serves the static content from a fileystem [1]
> > >
> > > regards, Achim
> > >
> > > [1] -
> http://ops4j.github.io/pax/web/SNAPSHOT/#_advanced_jetty_configuration
> > >
> > >
> > > 2015-09-15 14:34 GMT+02:00 Paul Spencer <pa...@apache.org>:
> > > (Karaf 3.0.3 and Pax Web)
> > > I am developing webpages that are include in a bundle.  My current
> workflow, which seems wrong, is as follows:
> > >
> > > 1) Edit the web source files (.jspx,.html,.css,...)
> > > 2) Rebuild the bundle
> > > 3) Copy the bundle to Karaf's deploy directory
> > > 4) Test the changes
> > >
> > > I know there is a better way and I am open to suggestions.
> > >
> > > Paul Spencer
> > >
> > >
> > >
> > >
> > >
> > > --
> > >
> > > Apache Member
> > > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> > > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
> Committer & Project Lead
> > > blog <http://notizblog.nierbeck.de/>
> > > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> > >
> > > Software Architect / Project Manager / Scrum Master
> > >
> >
> >
> >
> >
> > --
> >
> > Apache Member
> > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
> & Project Lead
> > blog <http://notizblog.nierbeck.de/>
> > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> >
> > Software Architect / Project Manager / Scrum Master
> >
>
>


-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: How to edit web page source files without redeploying the bundle?

Posted by Paul Spencer <pa...@apache.org>.
Achim,
I have created the deploy/war, deploy/jar, and deploy/war/jar but the .war file is not expanding.  I went so far as removing the .war from the deploy directory, restarting karaf, and copying the .war in the deploy directory. Outside of the default configuration, is additional configuration or are additional bundles required?

***
* Currently installed features
***

karaf@localhost()> feature:list -i
Name                   | Version         | Installed | Repository               | Description                                       
------------------------------------------------------------------------------------------------------------------------------------
transaction            | 1.1.1           | x         | enterprise-3.0.3         | OSGi Transaction Manager                          
jndi                   | 3.0.3           | x         | enterprise-3.0.3         | OSGi Service Registry JNDI access                 
jdbc                   | 3.0.3           | x         | enterprise-3.0.3         | JDBC service and commands                         
standard               | 3.0.3           | x         | standard-3.0.3           | Karaf standard feature                            
config                 | 3.0.3           | x         | standard-3.0.3           | Provide OSGi ConfigAdmin support                  
region                 | 3.0.3           | x         | standard-3.0.3           | Provide Region Support                            
package                | 3.0.3           | x         | standard-3.0.3           | Package commands and mbeans                       
http                   | 3.0.3           | x         | standard-3.0.3           | Implementation of the OSGI HTTP Service           
http-whiteboard        | 3.0.3           | x         | standard-3.0.3           | Provide HTTP Whiteboard pattern support           
war                    | 3.0.3           | x         | standard-3.0.3           | Turn Karaf as a full WebContainer                 
kar                    | 3.0.3           | x         | standard-3.0.3           | Provide KAR (KARaf archive) support               
ssh                    | 3.0.3           | x         | standard-3.0.3           | Provide a SSHd server on Karaf                    
management             | 3.0.3           | x         | standard-3.0.3           | Provide a JMX MBeanServer and a set of MBeans in K
scr                    | 3.0.3           | x         | standard-3.0.3           | Declarative Service support                       
pax-cdi                | 0.11.0          | x         | org.ops4j.pax.cdi-0.11.0 | Provide CDI support                               
cxf-specs              | 3.0.2           | x         | cxf-3.0.2                |                                                   
cxf-core               | 3.0.2           | x         | cxf-3.0.2                |                                                   
cxf-wsdl               | 3.0.2           | x         | cxf-3.0.2                |                                                   
cxf-http               | 3.0.2           | x         | cxf-3.0.2                |                                                   
cxf-bindings-soap      | 3.0.2           | x         | cxf-3.0.2                |                                                   
cxf-jaxws              | 3.0.2           | x         | cxf-3.0.2                |                                                   
cxf-databinding-jaxb   | 3.0.2           | x         | cxf-3.0.2                |                                                   
pax-jetty              | 9.0.7.v20131107 | x         | org.ops4j.pax.web-4.0.2  | Provide Jetty engine support                      
pax-http               | 4.0.2           | x         | org.ops4j.pax.web-4.0.2  | Implementation of the OSGI HTTP Service           
pax-http-whiteboard    | 4.0.2           | x         | org.ops4j.pax.web-4.0.2  | Provide HTTP Whiteboard pattern support           
pax-war                | 4.0.2           | x         | org.ops4j.pax.web-4.0.2  | Provide support of a full WebContainer            
karaf@localhost()> 


Paul Spencer

> On Sep 15, 2015, at 2:52 PM, Achim Nierbeck <bc...@googlemail.com> wrote:
> 
> Hi Paul, 
> 
> sorry I missed the JSF part. 
> an exploded war/jar in the deploy folder should work/was supposed to be working. 
> So option a) should work for you. Just create a war/jar directory in the deploy folder and work on your stuff there. 
> 
> b) is only partially similar, you miss the step of doing the copying yourself and the deployment/update is done automatic. 
> 
> c) yeah forget about that one, as it's only for static resources. 
> 
> regards, achim 
>  
> 
> 2015-09-15 20:20 GMT+02:00 Paul Spencer <pa...@apache.org>:
> Achim,
> My bundle is a war the uses MyFaces, PrimeFaces, database, and business logic bundles, so you options are not working for me.  The Jetty documentation[1] reference the MANIFEST property "Jetty-bundleInstall" and "mostly useful for those OSGi frameworks that unpack bundles by default."
> 
> Can PAX-WEB be configured to "unpack bundles by default"?  If so, how do I define the directory the war is unpacked into?
> 
> Why options did not work for me:
> a - Does not work because the Imported-Package defined in the bundle are not used or displayed by bundle:header
> b - Similar to my current workflow.
> c - Same as failure as "a".  I was able to see the files, but the classpath was missing JSF and other bundles.
>   ** Added the following to etc/jetty.xml and exploded war in to /tmp/foo
>   <Get name="handler">
>       <Call name="addHandler">
>           <Arg>
>               <New class="org.eclipse.jetty.servlet.ServletContextHandler">
>                   <Set name="contextPath">/foo</Set>
>                   <Set name="resourceBase">/tmp/foo</Set>
>                   <Call name="addServlet">
>                       <Arg>org.eclipse.jetty.servlet.DefaultServlet</Arg>
>                       <Arg>/</Arg>
>                   </Call>
>               </New>
>           </Arg>
>       </Call>
>   </Get>
> 
> 
> 
> Paul Spencer
> 
> 
> [1]http://www.eclipse.org/jetty/documentation/9.0.6.v20130930/framework-jetty-osgi.html#d0e15965
> 
> 
> 
> > On Sep 15, 2015, at 10:12 AM, Achim Nierbeck <bc...@googlemail.com> wrote:
> >
> > Hi,
> >
> > you have a couple of different possibilities:
> >
> > a) Use an exploded WAR in the deploy folder
> > b) build your bundle with maven and have karaf listening to it via bundle:watch
> > c) make sure you have an extra handler configured in the jetty.xml which serves the static content from a fileystem [1]
> >
> > regards, Achim
> >
> > [1] - http://ops4j.github.io/pax/web/SNAPSHOT/#_advanced_jetty_configuration
> >
> >
> > 2015-09-15 14:34 GMT+02:00 Paul Spencer <pa...@apache.org>:
> > (Karaf 3.0.3 and Pax Web)
> > I am developing webpages that are include in a bundle.  My current workflow, which seems wrong, is as follows:
> >
> > 1) Edit the web source files (.jspx,.html,.css,...)
> > 2) Rebuild the bundle
> > 3) Copy the bundle to Karaf's deploy directory
> > 4) Test the changes
> >
> > I know there is a better way and I am open to suggestions.
> >
> > Paul Spencer
> >
> >
> >
> >
> >
> > --
> >
> > Apache Member
> > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead
> > blog <http://notizblog.nierbeck.de/>
> > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> >
> > Software Architect / Project Manager / Scrum Master
> >
> 
> 
> 
> 
> -- 
> 
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> 
> Software Architect / Project Manager / Scrum Master 
> 


Re: How to edit web page source files without redeploying the bundle?

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi Paul,

sorry I missed the JSF part.
an exploded war/jar in the deploy folder should work/was supposed to be
working.
So option a) should work for you. Just create a war/jar directory in the
deploy folder and work on your stuff there.

b) is only partially similar, you miss the step of doing the copying
yourself and the deployment/update is done automatic.

c) yeah forget about that one, as it's only for static resources.

regards, achim


2015-09-15 20:20 GMT+02:00 Paul Spencer <pa...@apache.org>:

> Achim,
> My bundle is a war the uses MyFaces, PrimeFaces, database, and business
> logic bundles, so you options are not working for me.  The Jetty
> documentation[1] reference the MANIFEST property "Jetty-bundleInstall" and
> "mostly useful for those OSGi frameworks that unpack bundles by default."
>
> Can PAX-WEB be configured to "unpack bundles by default"?  If so, how do I
> define the directory the war is unpacked into?
>
> Why options did not work for me:
> a - Does not work because the Imported-Package defined in the bundle are
> not used or displayed by bundle:header
> b - Similar to my current workflow.
> c - Same as failure as "a".  I was able to see the files, but the
> classpath was missing JSF and other bundles.
>   ** Added the following to etc/jetty.xml and exploded war in to /tmp/foo
>   <Get name="handler">
>       <Call name="addHandler">
>           <Arg>
>               <New class="org.eclipse.jetty.servlet.ServletContextHandler">
>                   <Set name="contextPath">/foo</Set>
>                   <Set name="resourceBase">/tmp/foo</Set>
>                   <Call name="addServlet">
>                       <Arg>org.eclipse.jetty.servlet.DefaultServlet</Arg>
>                       <Arg>/</Arg>
>                   </Call>
>               </New>
>           </Arg>
>       </Call>
>   </Get>
>
>
>
> Paul Spencer
>
>
> [1]
> http://www.eclipse.org/jetty/documentation/9.0.6.v20130930/framework-jetty-osgi.html#d0e15965
>
>
>
> > On Sep 15, 2015, at 10:12 AM, Achim Nierbeck <bc...@googlemail.com>
> wrote:
> >
> > Hi,
> >
> > you have a couple of different possibilities:
> >
> > a) Use an exploded WAR in the deploy folder
> > b) build your bundle with maven and have karaf listening to it via
> bundle:watch
> > c) make sure you have an extra handler configured in the jetty.xml which
> serves the static content from a fileystem [1]
> >
> > regards, Achim
> >
> > [1] -
> http://ops4j.github.io/pax/web/SNAPSHOT/#_advanced_jetty_configuration
> >
> >
> > 2015-09-15 14:34 GMT+02:00 Paul Spencer <pa...@apache.org>:
> > (Karaf 3.0.3 and Pax Web)
> > I am developing webpages that are include in a bundle.  My current
> workflow, which seems wrong, is as follows:
> >
> > 1) Edit the web source files (.jspx,.html,.css,...)
> > 2) Rebuild the bundle
> > 3) Copy the bundle to Karaf's deploy directory
> > 4) Test the changes
> >
> > I know there is a better way and I am open to suggestions.
> >
> > Paul Spencer
> >
> >
> >
> >
> >
> > --
> >
> > Apache Member
> > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
> & Project Lead
> > blog <http://notizblog.nierbeck.de/>
> > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> >
> > Software Architect / Project Manager / Scrum Master
> >
>
>


-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: How to edit web page source files without redeploying the bundle?

Posted by Paul Spencer <pa...@apache.org>.
Achim,
My bundle is a war the uses MyFaces, PrimeFaces, database, and business logic bundles, so you options are not working for me.  The Jetty documentation[1] reference the MANIFEST property "Jetty-bundleInstall" and "mostly useful for those OSGi frameworks that unpack bundles by default."

Can PAX-WEB be configured to "unpack bundles by default"?  If so, how do I define the directory the war is unpacked into?

Why options did not work for me:
a - Does not work because the Imported-Package defined in the bundle are not used or displayed by bundle:header
b - Similar to my current workflow.
c - Same as failure as "a".  I was able to see the files, but the classpath was missing JSF and other bundles.
  ** Added the following to etc/jetty.xml and exploded war in to /tmp/foo
  <Get name="handler">
      <Call name="addHandler">
          <Arg>
              <New class="org.eclipse.jetty.servlet.ServletContextHandler">
                  <Set name="contextPath">/foo</Set>
                  <Set name="resourceBase">/tmp/foo</Set>
                  <Call name="addServlet">
                      <Arg>org.eclipse.jetty.servlet.DefaultServlet</Arg>
                      <Arg>/</Arg>
                  </Call>
              </New>
          </Arg>
      </Call>
  </Get>



Paul Spencer


[1]http://www.eclipse.org/jetty/documentation/9.0.6.v20130930/framework-jetty-osgi.html#d0e15965



> On Sep 15, 2015, at 10:12 AM, Achim Nierbeck <bc...@googlemail.com> wrote:
> 
> Hi, 
> 
> you have a couple of different possibilities: 
> 
> a) Use an exploded WAR in the deploy folder 
> b) build your bundle with maven and have karaf listening to it via bundle:watch 
> c) make sure you have an extra handler configured in the jetty.xml which serves the static content from a fileystem [1]
> 
> regards, Achim 
> 
> [1] - http://ops4j.github.io/pax/web/SNAPSHOT/#_advanced_jetty_configuration
> 
> 
> 2015-09-15 14:34 GMT+02:00 Paul Spencer <pa...@apache.org>:
> (Karaf 3.0.3 and Pax Web)
> I am developing webpages that are include in a bundle.  My current workflow, which seems wrong, is as follows:
> 
> 1) Edit the web source files (.jspx,.html,.css,...)
> 2) Rebuild the bundle
> 3) Copy the bundle to Karaf's deploy directory
> 4) Test the changes
> 
> I know there is a better way and I am open to suggestions.
> 
> Paul Spencer
> 
>  
> 
> 
> 
> -- 
> 
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> 
> Software Architect / Project Manager / Scrum Master 
> 


Re: How to edit web page source files without redeploying the bundle?

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,

you have a couple of different possibilities:

a) Use an exploded WAR in the deploy folder
b) build your bundle with maven and have karaf listening to it via
bundle:watch
c) make sure you have an extra handler configured in the jetty.xml which
serves the static content from a fileystem [1]

regards, Achim

[1] - http://ops4j.github.io/pax/web/SNAPSHOT/#_advanced_jetty_configuration


2015-09-15 14:34 GMT+02:00 Paul Spencer <pa...@apache.org>:

> (Karaf 3.0.3 and Pax Web)
> I am developing webpages that are include in a bundle.  My current
> workflow, which seems wrong, is as follows:
>
> 1) Edit the web source files (.jspx,.html,.css,...)
> 2) Rebuild the bundle
> 3) Copy the bundle to Karaf's deploy directory
> 4) Test the changes
>
> I know there is a better way and I am open to suggestions.
>
> Paul Spencer
>
>




-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master