Win a copy of High Performance Python for Data Analytics this week in the Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Thymeleaf 3.0: th:text works with an expression, but th:replace doesn't

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thymeleaf 3.0

Variable

From the controller I sent:



html



Exception

org.thymeleaf.exceptions.TemplateInputException: Error resolving template [${'themes/' + theme + '/general/footer], template might not exist or might not be accessible by any of the configured Template Resolvers (template: "themes/holmes/posts/postList" - line 25, col 9)



Proof that the commented expression works


Problem
The commented out expression works. But the uncommented one blows up. To the best of my ability I understand that the compiler sees a string rather than an expression here.

Could you help me understand:

1. What the difference is between the commented and uncommented lines.

2. How to write the replacement expression correctly.





 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic