How to deploy a web application manually in wildfly9?

Asked

Viewed 1,267 times

1

I have already implanted a web application manually in Omcat, I know it is not a complete container,but now I would like to manually deploy in wildfly9 .
I would like to manually implode the web application in wildflyjá because I already tried to run netbeans but couldn’t get it says the port is already used and so on. I’ve looked in several tutorials , but it’s all kind of old.
If it is possible to manually deploy to the wildfly, how should I proceed to do a deployment test using a helloworld application that I implanted in the Tomcat webapp to run on wildfly?
What should I modify inside the WEB-INF directory? You need to change something in the standalone.xml file inside the wildfly directory?

I mentioned the Tomcat webapp there is something similar in wildfly?

To access an application running on Tomcat just open the browser and type localhost:8080/Helloworld/index.html how to do the same in wildfly?

1 answer

3

If it is possible to manually deploy to wildfly, how do I perform a deployment test using an application helloworld that I implanted in the Tomcat webapp to run in wildfly?

It is possible. If you are using an instance standalone, just include the artifact to be implanted in standalone/deployments, together with a marker for implantation (if the self deploy not enabled). So, if your artifact is called HelloWorld.war, also include an empty file called HelloWorld.war.dodeploy (touchHelloworld.war.dodeploy`)

You can check detailed documentation here: Application Deployment

You can also deploy from the administration web console, so after you initialize the server, go to http://localhost:9990, type user and password (you should create before using the scripts add-user.bat or add-user.sh), flap Deployments, button Add and choose the type and artifact to be implanted:

Deploy web console

Then just follow the steps...

What should I modify inside the WEB-INF directory? Would I need to change something in the standalone.xml file inside the wildfly directory?

I don’t know, do you? You depend on something provided by container, as datasources, custom system properties, thread pool, socket bindings, etc.? If not, simply change the deployment-scanner (subsystem deployment-scanner) for something like this:

<subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">
    <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" 
        runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}" 
        scan-interval="5000" auto-deploy-zipped="true" auto-deploy-exploded="false" />
</subsystem>

This will make in your case, war placed in deployments are deployed, but not already uncompressed applications (for this, change auto-deploy-exploded for true).

Most things can be configured by web console as well, such as system properties, socket bindings, datasources, mail Sessions, logs, etc.

I mentioned the Tomcat webapp there is something similar in wildfly?

Yes, as stated above is by default the directory deployments in standalone.

To access an application running on Tomcat just open the browser and type localhost:8080/Helloworld/index.html how to do the same in wildfly?

If HelloWorld is the context of the deployed application and is using Wildfly default settings, yes, only this will suffice.

Everything said above can be done by the CLI, so consider reading about it: CLI Recipes

In case of problems, be more specific in your doubt :)

  • thanks for the patience ! It is that the indicated documentation is not so didactic for beginners . I will remove photo, just wanted you to see. Why when I open the browser does it not run? http://localhost:8083/Helloworld/index.html = not found

  • @Penada painted because the implanted artifact has another name, if you look in the folder deployments you will see that you have the version in the name.

  • Wildfly comes with some ready-made examples as well as Tomcat?

  • @Pinpainted yes, Quickstart has a lot of things: https://github.com/wildfly/quickstart

  • 1

    @Penada painted and there, succeeded? Some doubt about this yet?

  • Thanks friend. Not yet, I gave up because I was going to waste a lot of time, esotu me turning with glassfish!! I have some projects to deliver !! Then I’ll go back to the wildfly! Anything I can get you ,brother!

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.