Skip to content

Conversation

peutch
Copy link
Contributor

@peutch peutch commented Jan 21, 2025

Hi,

Following my remark about the use of WebJars in issue #354, here is an attempt to migrate struts2-bootstrap as an illustration.
I think it could simplify upgrading the dependency to Bootstrap and Bootstrap Icons components.
Note that it also includes a small fix 4ca2fbf.

Regards,
Patrice

@lukaszlenart
Copy link
Member

but shouldn't we add support for WebJars into Struts itself?

@peutch
Copy link
Contributor Author

peutch commented Jan 21, 2025

I think at least something could be done in the same way for struts2-jquery if there is interest in it.

@lukaszlenart
Copy link
Member

lukaszlenart commented Jan 21, 2025

I meant to add support for /webjars/* endpoint, currently Struts is serving static content using only /static/*, an example
https://www.baeldung.com/maven-webjars#Simple

@peutch
Copy link
Contributor Author

peutch commented Jan 22, 2025

Could struts.ui.staticContentPath be a list?

@gregh3269
Copy link
Contributor

The down side is it does make it more difficult to debug (ie adding console.log) as the assets are in a jar.

Also don't want the pom versions managed by renovate bot.

@lukaszlenart
Copy link
Member

Could struts.ui.staticContentPath be a list?

It can be, but I would rather add a dedicated logic to serve WebJars, something like struts.serve.webJars=true and then struts.ui.webJarsPath=/webjars

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

Successfully merging this pull request may close these issues.

3 participants