Various problems happen at deploy time if you deploy a file and change the name or runtime-name arguments. (Note: in the CLI, the argument to change the runtime-name is "runtime-name" rather than "runtime_name" as described in the help. See
If I deploy foo.war and I only change the runtime-name=bar.war, it will deploy normally, but the context will be set to /foo instead of /bar.
If I deploy stuff.war and change both names with name=hello and runtime-name=hello.war, the context is set to /h and I will get a 404 when I try to hit my page:
[standalone@localhost:9999 /] deploy /projects/foo.war/stuff.war --name=hello --runtime-name=hello.war
'hello' deployed successfully.
16:46:15,916 INFO [org.jboss.as.server.deployment] (ManagementCommunication-threads - 10) Content added at location C:\as7trunk\jboss-as\build\target\jboss-7.0.0.Beta4-S
16:46:26,096 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) Starting deployment of "hello"
16:46:26,133 INFO [org.jboss.web] (MSC service thread 1-5) registering web context: /h