1

I am working on the Maven-based Project where I have to create a jar file that contains JavaScript file(E.g Bar chart) and in the second project, I have the Thymeleaf template, where I have to load the jar file to view the contents. Actually it is a modular-based Project.

The question is how can i load the executed jar/war file of the Maven-based project to the second Thymeleaf-based project to view the contents on it?

Thanks in Advance.

1 Answer 1

1

Welcome.

I tested this two months ago and used a jar project that was shown in the image. Basically, you should call these files from the root of the main project ex: http://localhost:8080/project/js/bootstrap.js

I left this project public, I created exactly to test this situation, if you want, you can see it in this repo: https://github.com/e3duardo/webasset

webasset

Sign up to request clarification or add additional context in comments.

4 Comments

But I want to put the jar file in the other project. The main question is how Thymeleaf will access the Js file from the jar file?
After a slight research i come up with an idea that one of the solution is Thymeleaf Template Resolver. Have you any idea about it.
Thanks for sharing the repo. If i am not wrong your project cover the first part of my question and now i am looking forward for the second part solution.
yes, I never used Thymeleaf before, but if you can import that js file in somewhere, you will make it. sorry I can't help more with Thymeleaf.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.