Deploy applications in wasProgramUsually, an empty war package is deployed first, and then the program is overwritten under the application directory. Otherwise, war Packages containing various programs will always encounter war package exceptions during deployment, because was will strictly verify the content format of the war package during deployment.
I have always done the same thing before, but today I have encountered another problem.
Problem description:An exception occurred when deploying the war package.
Iwae0022e exception occurred loading deployment descriptor for module "demo. War" in ear file "/home/was/was6/profiles/invalid rv01/wstemp/714564614/upload/demo_war.ear" exception occurs. View logs to obtain detailed information.
View systemerr. Log
Wrapped exception
Org. xml. Sax. saxparseexception: Attribute "version" must be declared for element type "Web-app ".
At org. Apache. xerces. util. errorhandlerwrapper. createsaxparseexception (unknown source)
At org. Apache. xerces. util. errorhandlerwrapper. Error (unknown source)
Solution:You need to modify the Web. xml file
Before Modification
<? XML version = "1.0" encoding = "UTF-8"?> <Web-app version = "2.5" xmlns = "dependency>
After modification
<? XML version = "1.0" encoding = "UTF-8"?> <Web-app id = "webapp_id" version = "2.4" xmlns = "timeout>
After modifying the Web. xml file, re-package the war file and solve the redeployment problem.