Skip to content
This repository has been archived by the owner on Feb 15, 2021. It is now read-only.

Tomcat with EasyFXML #42

Open
hubertstruminski opened this issue Jul 14, 2020 · 2 comments
Open

Tomcat with EasyFXML #42

hubertstruminski opened this issue Jul 14, 2020 · 2 comments

Comments

@hubertstruminski
Copy link

How can I run tomcat server with EasyFXML ? After integration my app with EasyFXML localhost doesn't work. Is it possible to run tomcat with EasyFXML?

@Tristan971
Copy link
Owner

It should work fine, however will require you to override this in your main class (which extends this class)

https://github.com/Tristan971/EasyFXML/blob/master/easyfxml/src/main/java/moe/tristan/easyfxml/FxApplication.java#L61

Specifically the .web(WebApplicationType.NONE) part

This was originally done because having a JavaFX application start a servlet caused some tests to never end when combined with TestFX. I'm not sure if it is still the case or not.

If I were you however, I would split the "UI" and "API" parts of it (I assume you need tomcat to handle OAuth callbacks?) to not have 2 very different lifecycles (JavaFX, bound the main stage's status, and the embedded Servlet, bound to the web application context)

Let me know if you need clarification here

Hopefully this weekend I'll have time to do some cleanup, including adding an OAuth (or at least web callback) sample

@hubertstruminski
Copy link
Author

Hello, for now I need this for development purposes. I use WebApplicationType.SERVLET for access H2 embedded database at localhost, but I think that for deployment I won't need localhost yet. Also, I need in this project OAuth callback to Google Login but I think that it can be done with WebView control and localhost won't be neccessary. Is some case exist that my app will not be works in the deployment stage if I use WebApplicationType.SERVLET ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants