[
https://issues.jboss.org/browse/AS7-4624?page=com.atlassian.jira.plugin.s...
]
Jean-Frederic Clere commented on AS7-4624:
------------------------------------------
I have done:
+++
[standalone@localhost:9999 subsystem=web] ./virtual-server=test:add
{"outcome" => "success"}
[standalone@localhost:9999 subsystem=web] :read-resource
{
"outcome" => "success",
"result" => {
"default-virtual-server" => "default-host",
"instance-id" => undefined,
"native" => "false",
"configuration" => {
"container" => undefined,
"static-resources" => undefined,
"jsp-configuration" => undefined
},
"connector" => {"http" => undefined},
"virtual-server" => {
"default-host" => undefined,
"test" => undefined
}
}
}
+++
Then deploy my test application:
[standalone@localhost:9999 subsystem=web] deploy
/home/jfclere/jbossweb_sandbox/webapps/myapp.war
and check it:
+++
[standalone@localhost:9999 subsystem=web]
/deployment=myapp.war/subsystem=web:read-resource
{
"outcome" => "success",
"result" => {
"context-root" => "/myapp",
"virtual-host" => "test",
"servlet" => {
"TestOutputStream" => undefined,
"X509" => undefined,
"TestDispatch" => undefined,
"GrowPage" => undefined,
"TestSnoop" => undefined,
"MySession" => undefined,
"BigField" => undefined,
"TestError" => undefined,
"TestServlet" => undefined,
"TestBuff" => undefined,
"TestAsyncServlet" => undefined,
"MyCount" => undefined,
"MyCookies" => undefined,
"GrowCookies" => undefined,
"TestRedirect" => undefined
}
}
}
+++
and tested it with telnet:
+++
GET /myapp/MyCount HTTP/1.1
Host: test
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=B26UN-7fcaUWVf-EvC-1bFZa; Path=/myapp; HttpOnly; Secure
....
GET /myapp/MyCount HTTP/1.1
Host: localhost
HTTP/1.1 404 Not Found
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
Content-Length: 1002
Date: Thu, 26 Apr 2012 07:23:27 GMT
+++
It works for me.
Virtual-host from jboss-web.xml not applied to deployments
----------------------------------------------------------
Key: AS7-4624
URL:
https://issues.jboss.org/browse/AS7-4624
Project: Application Server 7
Issue Type: Bug
Components: Web
Reporter: Stefan Negrea
Assignee: Jean-Frederic Clere
Priority: Critical
Labels: rhq
Using a standalone server, deployed a war with jboss-web.xml. The jboss-web.xml had only
one entry for virtual-host (but it was not the default one). The virtual host was defined
on the server prior to the deployment. The virtual-host setting was not applied correctly
and the web subsystem under the deployment was reporting virtual-host as
'default-host'.
The sample jboss-web.xml used:
<jboss-web>
<virtual-host>test</virtual-host>
</jboss-web>
CLI output:
[standalone@localhost:9999 subsystem=web] pwd
/deployment=hellothere.war/subsystem=web
[standalone@localhost:9999 subsystem=web] :read-resource
{
"outcome" => "success",
"result" => {
"context-root" => "/hellothere",
"servlet" => undefined,
"virtual-host" => "default-host"
},
"response-headers" => {"process-state" =>
"reload-required"}
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira