spring - Using static href with query string in Thymeleaf -


i have html prototype of application, prototype on apache server, used apache server side includes include different pages template layouts.

now i'm adding labels thymeleaf prototype use in application spring. problem many of urls used need query string load content apache , generates error using thymeleaf.

for example, link in static prototype looks this:

<a href="index.html?seccion=asignaturas&area=materiales-editar"><i class="fa fa-plus-circle"></i> registrar material</a> 

adding thymeleaf should like:

<a href="index.html?seccion=asignaturas&area=materiales-editar" th:href="@{/asignaturas/{idasignatura}/seccion/{idseccion}/materiales/registro.html(idasignatura=${asignatura.id},idseccion=${asignatura.idseccion},idfuncion=${param.idfuncion},idmodulo=${param.idmodulo})}"><i class="fa fa-plus-circle"></i> registrar material</a> 

but application crashes, error checking static query string url (?seccion=asignaturas)

could live prototype (running on apache, ssi) thymeleaf labels on actual application?

the problem was not escaping "&" recommended herein (escaping & character). link follows:

<a href="index.html?seccion=asignaturas&amp;area=materiales-editar" th:href="@{/asignaturas/{idasignatura}/seccion/{idseccion}/materiales/registro.html(idasignatura=${asignatura.id},idseccion=${asignatura.idseccion},idfuncion=${param.idfuncion},idmodulo=${param.idmodulo})}"><i class="fa fa-plus-circle"></i> registrar material</a> 

now not have error. thanks!


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -