[jboss-jira] [JBoss JIRA] (WFLY-13293) When deploying "ROOT.war" in EAP7.x, the context root value output through jboss-cli is not valid

Ricardo Martin Camarero (Jira) issues at jboss.org
Wed Apr 1 11:46:49 EDT 2020


    [ https://issues.redhat.com/browse/WFLY-13293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14017509#comment-14017509 ] 

Ricardo Martin Camarero commented on WFLY-13293:
------------------------------------------------

[~flavia.rainone] [~brian.stansberry] I have worked on the second option, check this:

https://github.com/wildfly/wildfly/compare/master...rmartinc:WFLY-13161-no-alias

When you have time, take a look and let me know if this makes sense or I'm just going nuts (the alias is just commented out for the moment, but you can see the idea, it's not definitive yet).

> When deploying "ROOT.war" in EAP7.x, the context root value output through jboss-cli is not valid
> -------------------------------------------------------------------------------------------------
>
>                 Key: WFLY-13293
>                 URL: https://issues.redhat.com/browse/WFLY-13293
>             Project: WildFly
>          Issue Type: Bug
>          Components: Web (Undertow)
>    Affects Versions: 19.0.0.Final
>            Reporter: Ricardo Martin Camarero
>            Assignee: Ricardo Martin Camarero
>            Priority: Major
>
> *When deploying "ROOT.war" default context-root is "/" even though i set a specific context-root in jboss-web.xml. However, If I check resources by jboss-cli, it seems like context-root value refers to jboss-web.xml and this value is invalid.*
> ROOT.war/WEB-INF/jboss-web.xml
> {code}
> <jboss-web version="7.0" 
>         xmlns:jboss="http://www.jboss.com/xml/ns/javaee" 
>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>         xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee jboss-web_7_0.xsd">
>    <context-root>/hello</context-root>
> </jboss-web>{code}
> {code}[standalone at 192.168.122.1:10090 /] deployment-info
> NAME     RUNTIME-NAME PERSISTENT ENABLED STATUS 
> ROOT.war ROOT.war     true       true    OK  
> {code}
> server.log
> {code}
> 2020-03-24 10:35:56,344 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 78) WFLYUT0021: Registered web context: '/' for server 'default-server'
> 2020-03-24 10:35:56,354 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "ROOT.war" (runtime-name : "ROOT.war")
> {code}
> However, If I check resource by jboss-cli, it seems like context-root value refers to jboss-web.xml and this vaule is invalid.
> {code}
> [standalone at 192.168.122.1:10090 /] /deployment=ROOT.war/subsystem=undertow:read-resource(include-runtime=true)
> {
>     "outcome" => "success",
>     "result" => {
>         "active-sessions" => 0,
>         "context-root" => "/hello",   => this is invalid, the real value is "/"
>         "expired-sessions" => 0,
>         "highest-session-count" => 0,
>         "max-active-sessions" => -1,
>         "rejected-sessions" => 0,
>         "server" => "default-server",
>         "session-avg-alive-time" => 0,
>         "session-max-alive-time" => 0,
>         "sessions-created" => 0,
>         "virtual-host" => "default-host",
>         "servlet" => undefined,
>         "websocket" => undefined
>     }
> }
> {code}
>  valid context-root is "/"
> {code}
> [hyoskim at hyoskim sophia]$ curl -v http://192.168.122.1:8180/test.jsp
> * About to connect() to 192.168.122.1 port 8180 (#0)
> *   Trying 192.168.122.1...
> * Connected to 192.168.122.1 (192.168.122.1) port 8180 (#0)
> > GET /test.jsp HTTP/1.1
> > User-Agent: curl/7.29.0
> > Host: 192.168.122.1:8180
> > Accept: */*
> > 
> < HTTP/1.1 200 OK
> < Connection: keep-alive
> < X-Powered-By: JSP/2.3
> < Set-Cookie: JSESSIONID=_Ej56uTEuy1B0U2Oi94pcVtCNwg7ngRNr7HO7TQ7.worker1; path=/
> < Content-Type: text/html;charset=ISO-8859-1
> < Content-Length: 6
> < Date: Tue, 24 Mar 2020 01:37:53 GMT
> < 
> hello
> [hyoskim at hyoskim sophia]$ curl -v http://192.168.122.1:8180/hello/test.jsp
> * About to connect() to 192.168.122.1 port 8180 (#0)
> *   Trying 192.168.122.1...
> * Connected to 192.168.122.1 (192.168.122.1) port 8180 (#0)
> > GET /hello/test.jsp HTTP/1.1
> > User-Agent: curl/7.29.0
> > Host: 192.168.122.1:8180
> > Accept: */*
> > 
> < HTTP/1.1 404 Not Found
> < Connection: keep-alive
> < Content-Type: text/html;charset=UTF-8
> < Content-Length: 74
> < Date: Tue, 24 Mar 2020 01:37:23 GMT
> < 
> * Connection #0 to host 192.168.122.1 left intact
> <html><head><title>Error</title></head><body>/hello/test.jsp</body></html>{code}



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list