Hi Kevin,
Cheng Zhang schrieb:
> Hi,
>
> I downloaded the .war file, put it to the tomcat webapp dir. Everything looks
> good.
>
> And then I changed the sling.js in the resource bundle
> org.apache.sling.servlets.post-2.0.2-incubator.jar, updated the jar with new
> sling.js, restarted tomcat. But I still see the old sling.js at
> http://...../system/sling.js.
>
> Any idea? Is there any cache I should delete first?
Hmm, what JAR file did you update ? and where ?
As you may know, Sling is a bunch of OSGi bundles, which you may update
at runtime without even thinking about restarting the container (tomcat
in your case).
What you would do is:
* get the source
* patch the sling.js file
* build the bundle (mvn clean package should do this)
* deploy the bundle into the Sling OSGi framework
The last step can be done either by using the Maven Sling plugin, which
talks to the Felix Web Console included in Sling or by manually
uploading the bundle to the Web Console using your favourite browser.
(The following examples assume you are running Sling in the default
context on port 8888)
(1) To upload with the Maven Sling Plugin: you may build and deploy in a
single Maven call:
$ mvn clean package \
-Dsling.url=http://localhost:8888/system/console \
org.apache.sling:maven-sling-plugin:2.0.2-incubator:install
(2) To manually upload, direct your browser to
http://localhost:8888/system/console and upload the bundle using the
form field.
Hope this helps.
BTW: What is the reason for you to modify the sling.js file ? Is there a
bug in it or is there something missing ? Would you mind to contribute
your fixes/extensions ? Thanks.
Regards
Felix