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
(touch
Helloworld.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:
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
– Pena Pintada
@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.– Bruno César
Wildfly comes with some ready-made examples as well as Tomcat?
– Pena Pintada
@Pinpainted yes, Quickstart has a lot of things: https://github.com/wildfly/quickstart
– Bruno César
@Penada painted and there, succeeded? Some doubt about this yet?
– Bruno César
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!
– Pena Pintada