6 Replies Latest reply on Apr 23, 2019 6:14 AM by Faisal Khalique

    Unable to access URL by deploying .war to jboss 7

    Prateek Kumar Singh Newbie

      I have developed a Spring 3.0 based application using maven and JPA2.1. I have created a .war file and deploy to JBOSS server but when I'm trying to access the URL http://localhost:9999/project/index.html then its downloading a file of 1 kb .

       

      I'm unable to figure out the problem. what is going wrong?

      Any help will be appreciated.

        • 1. Re: Unable to access URL by deploying .war to jboss 7
          Lalit Shaktawat Newbie

          Hi Prateek

           

          Check your server log. Whether it is deployed or not. If it is properly deployed then check your URL properly.

           

          Lalit

          • 2. Re: Unable to access URL by deploying .war to jboss 7
            Prateek Kumar Singh Newbie

            Hi Lalit,

            Thanks for your response.

             

            My log looks like..

             

            20:05:31,080 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-1) JBoss Web Services - Stack CXF Server 4.0.2.GA

            20:05:31,466 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-2) JBAS015012: Started FileSystemDeploymentService for directory C:\jboss-as-7.1.1.Final\standalone\deployments

            20:05:31,505 INFO  [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Listening on localhost/127.0.0.1:4447

            20:05:31,506 INFO  [org.jboss.as.remoting] (MSC service thread 1-3) JBAS017100: Listening on /127.0.0.1:9999

            20:05:31,526 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-5) Starting Coyote HTTP/1.1 on http-localhost-127.0.0.1-12347

             

            To access the controller I'm using   http://127.0.0.1:9999/myproject/index.html    .

             

            I'm not using jboss-web.xml becouse it causing issue so what shoul be my URL?

            • 4. Re: Unable to access URL by deploying .war to jboss 7
              Lalit Shaktawat Newbie

              Hi Prateek

               

              20:05:31,506 INFO  [org.jboss.as.remoting] (MSC service thread 1-3) JBAS017100: Listening on /127.0.0.1:9999

               

              above line showing your management CLI. That means if you want to connect via management CLI. That time port 9999 is binding with JBoss. So you can't use http://127.0.0.1:9999/myproject/index.html for accessing your application.

              As you are mentioning that you deployed .war file. Please read complete JBoss booting log. While you 'll start your JBoss. It is also showing your deployment status. If it is deployed properly. It also created your application name.deployed file.

               

              and you can access your application using of local host IP and 8080 bind port. Like http://localhost:8080/project/index.html

              or

              http://127.0.0.1:8080/ <YOUR APPLICATION NAME>


              NOTE : One more thing that no need to you .html for your application. Try with both option.

              with .html or without .html

               

              Try and let me know. Whether it is working or not.

               

              Thanks

               

              Lalit

              • 5. Re: Unable to access URL by deploying .war to jboss 7
                Kuldeep Sharma Novice

                Have you made any changes to port conf?

                 

                20:05:31,526 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-5) Starting Coyote HTTP/1.1 on http-localhost-127.0.0.1-12347

                Try to access using port 12347 and check if it works.

                 

                Thanks!!

                • 6. Re: Unable to access URL by deploying .war to jboss 7
                  Faisal Khalique Newbie

                  An old thread but I stumbled upon this now (been working on IBM WAS for quite long and now on JBoss AS )

                  Looking through the logs, when the application is being deployed, I read the below lines

                   

                  09:56:22,619 INFO  [org.jboss.as.server.deployment] org.jboss.as.server.deployment.AbstractDeploymentUnitService::start(71) - JBAS015973: Starting subdeployment (runtime-name: "myapplication.war")

                  09:56:22,753 INFO  [org.apache.coyote.http11.Http11Protocol] org.apache.coyote.http11.Http11Protocol::init(180) - JBWEB003001: Coyote HTTP/1.1 initializing on : http-127.0.0.1:8643

                  09:56:22,771 INFO  [org.apache.coyote.http11.Http11Protocol] org.apache.coyote.http11.Http11Protocol::start(207) - JBWEB003000: Coyote HTTP/1.1 starting on: http-127.0.0.1:8643

                  09:56:22,793 INFO  [org.apache.coyote.http11.Http11Protocol] org.apache.coyote.http11.Http11Protocol::init(180) - JBWEB003001: Coyote HTTP/1.1 initializing on : http-127.0.0.1:8280

                  09:56:22,796 INFO  [org.apache.coyote.http11.Http11Protocol] org.apache.coyote.http11.Http11Protocol::start(207) - JBWEB003000: Coyote HTTP/1.1 starting on: http-127.0.0.1:8280

                   

                  Looking at the web socket bindings, the ports are marked as floating. Hence, the application is available at http://localhost:8280/<context-uri>/<servlet-path> or https://localhost:8643/<context-uri>/<servlet-path>

                  The socket bindings can be marked fixed in which case application should be accessible on 8080/8443

                  In the EAP management center, the fixed port attribute of the appropriate socket binding can be checked as well

                   

                  Hope this helps next user