J. Doe
J. Doe

Reputation: 80

Combining a spring REST Service with a JSF Page

ive tried the spring REST tutorial and i also got a simple JSF application (running on glassfish), both projects are maven based and i would like to "combine" them. Meaning, putting the REST project jar into the JSF project. Does that make sense?

The JSF page should send a request to the microservice REST project when it starts and display the result.

the REST project uses spring-boot and therefore tomcat. this pom.xml is supposed to use glassfish instead of tomcat, at least thats what the author tells on a spring blog.

Theres a part in it:

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
        <exclusions>
            <exclusion>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-tomcat</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

That says to "exclude" tomcat - which is fine, but how does maven or spring know to use glassfish instead?

Is there maybe a better way to combine these two projects? I would like to keep the projects seperate because of the dependencys in the pom.xml.

Upvotes: 1

Views: 1141

Answers (1)

J. Doe
J. Doe

Reputation: 80

Answer #1 in this question solves the confusion:
Using JSF as view technology of Spring MVC

spring mvc and jsf are rivals.

Upvotes: 1

Related Questions