Migrate Tomcat server to Wildfly in eclipse

Asked

Viewed 276 times

-1

I am trying to migrate a project (Java, Hibernate, JSF, Springsecurity, CDI, Mysql) that currently runs on TOMCAT to WILDFLY. I have already set up "standalone" with the connection and Wildfly alone initializes without any error.

When I start the application to be migrated, it gives error "error 404", IE, does not recognize the index, nor any other page, even pointing directly in the browser.

Thanks in advance for the help of friends.

  • What is the structure of the project?

  • Friend, I already solved part of the problem. Some of the problems were related to minor changes in pom code and web.xml. The only thing left pending is that the wildfly changes the name of the access link.

  • Foce speaks context of the application ?

1 answer

0

By default, Widfly uses the name of the deployed package as the application context. Ex: If the deployed package is my.War application, then the application will be accessed through the URI http://host:port/my work.

To change the context name, create a file in the WEB-INF/jboss-web.xml folder with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
   <context-root>/contextoaplicacao</context-root>
</jboss-web>

Where "contextual" is the name with which you want to access your application on the server.

  • That’s exactly it Rodrigo. When I deploy for Eclipse, unlike Tomcat, Wildfly uses the artifactId + version. It’s just a detail, but that led me to think that the app was not running properly because I could not access it. Thanks to the tip !

  • @mrzappabr, if the answer helped you, could you mark it as useful? Thank you!

  • Friend Rodrigo, unfortunately I can not give the vote. The system does not allow because I am new in the house, at least in the comments. Anyway, thanks for the touch and I’ve been using the tip when using Wildfly. Abs.

Browser other questions tagged

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