The touch command sets the timestamp of a file or directory to the current time. Therfore
touch deploy/web.war (for war deployment) or
touch deploy/web.war/WEB-INF/web.xml (for exploded deployment)
will trigger a redeployment.
sorry. i have used the touch command?
but the servlet i modified is also the old one? and there isn't show any message on the jboss command center .
Are you using unpacked deployment ?
Is your .war directory contained inside an ear ? If yes, you can only redeploy the complete ear by touching META-INF/application.xml.
I have the mywar.war(without in the *.ear) in the deploy folder.
The problem has been solved.thanks. i touch the web.xml.
Thank u: Harald Gliebe.
I have another question, what if you are in a windows platform and you don't have touch command?
There are implementations for the touch command for windows, too. Don't ask me, where to find, I don't know, all I know is that I have a touch command.
Maybe have a look and google for unix-utils for windows.
You will have to do it the hard(er) way. You can drag the WAR file out of the deploy directory, and then drag it back in.
However, usually when you have rebuilt a WAR from sources, the new archive will have a changed timestamp so when you deploy the changed WAR archive, JBoss will detect the timestamp change and redeploy.
If it is an unpacked archive, you will need to open the context.war/WEB-INF/web.xml with an editor and re-save it to change the timestamp.
> I have another question, what if you are in a windows
> platform and you don't have touch command?
highly recommended if you're planning to do any serious development on Windows platform