Clarifications regarding using JBANG with Tomcat 9 and JAR files #1858
-
Dear JBANG Team, I have a few questions and would appreciate your guidance on the following:
Here’s the Java file (without Java) I am currently using:
I look forward to your feedback and appreciate your support in advance. Best regards, |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Hi @nimayneb , I don't think anyone of us has ever tried using an embedded Tomcat with JBang, so this is unknown territory for us as well. Regarding the second point I can tell you that JARs normally don't have a And finally, yes, PS: IMO JBang is really good at running stuff, you can point it at files, JARs, Maven artifacts, both locally and remote and it will try to run them. But JBang is not really meant for building projects that result in distributable binaries. That's where Maven and Gradle shine. |
Beta Was this translation helpful? Give feedback.
-
Btw, we do have several examples of other embedded web servers here: https://github.com/jbangdev/jbang-examples/tree/main/examples You could take a look at |
Beta Was this translation helpful? Give feedback.
-
And as a final comment, if there is a way to run your Tomcat application in any way like the examples I gave in the previous example: by writing code that sets up a Tomcat instance and if you can tie that directly to your application code then I think the folder structure of the JAR shouldn't matter and you should be able to use the JAR that JBang generates. The only remaining issue would be to see if the |
Beta Was this translation helpful? Give feedback.
-
I was curious - so as @quintesse says then making custom archives is out of scope for jbang but embedded usecase should work. Here is what I got working with some StackOverflow and chatgpt help :)
then visit http://localhost:8089/aa hope that helps. |
Beta Was this translation helpful? Give feedback.
I was curious - so as @quintesse says then making custom archives is out of scope for jbang but embedded usecase should work.
Here is what I got working with some StackOverflow and chatgpt help :)