How to code AdminApp in the wsAdmin task

1.6k Views Asked by At

I am trying to issue a wsadmin command to load the virtual host after I install the new application "MYAPP". But I could not find the right syntax. Here is how my ANT task looks like:

<target name="loadVirtualHost">
    <wsAdmin 
    user="${was_user}" 
    password="${was_password}" 
    failonerror="${was_failonerror}" 
    washome="${was_home}" 
    profileName="${wsProfileName}" 
    command="$$AdminApp.edit(MYAPPEAR, [ -MapWebModToVH [[ myapp MYADDWEB.war,WEB-INF/web.xml default_host_ctst ]]])"/>
</target>

Error I got:

[wsadmin] WASX7015E: Exception running command: "$AdminApp.edit(MYAPPEAR, [ -MapWebModToVH [[ myapp MYAPPWEB.war,WEB-INF/web.xml default_host_ctst ]]])"; exception information:
[wsadmin]  com.ibm.bsf.BSFException: error while eval'ing Jacl expression:
[wsadmin] invalid command name "myapp"
[wsadmin]     while executing
[wsadmin] "myapp MYAPPWEB.war,WEB-INF/web.xml default_host_ctst "
[wsadmin]     invoked from within
[wsadmin] "[ myapp MYAPPWEB.war,WEB-INF/web.xml default_host_ctst "
[wsadmin]     invoked from within
[wsadmin] "-MapWebModToVH [[ myapp MYAPPWEB.war,WEB-INF/web.xml default_host_ctst ]"
[wsadmin]     invoked from within
[wsadmin] "$AdminApp.edit(MYAPPEAR, [ -MapWebModToVH [[ myapp MYAPPWEB.war,WEB-INF/web.xml default_host_ctst ]]])"
0

There are 0 best solutions below