How to unpackage and repackage a WAR file

后端 未结 8 1064

I have a WAR file. I would like to open it, edit an XML file, remove some jars and then re-package it.

I used WINRAR to open the WAR file and I removed some Jars and

8条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-02 12:53

    copy your war file to /tmp now extract the contents:

    cp warfile.war /tmp
    cd /tmp
    unzip warfile.war
    cd WEB-INF
    nano web.xml (or vim or any editor you want to use)
    cd ..
    zip -r -u warfile.war WEB-INF
    

    now you have in /tmp/warfile.war your file updated.

提交回复
热议问题