How to ignore pamaters in URL

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to ignore pamaters in URL

Neha k
Hi,

I tried it search many way but not found the ans .. hope u can help me..

My main .html page have the layout decorater .. something like that...
.... layout:decorator="@{th_head/}"

But when first url hits .. we creating the session and my main html gives this error -

HTTP Status 500 - Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Error resolving template "th_head;jsessionid=B0AA58BBE901A9A3A4ABC8F03B855A77", template might not exist or might not be accessible by any of the configured Template Resolvers

How to ignore any parameter added in url and only look for start in th_head (as this is exclusive html to replace the common content into head of html.. and parameters doesn't concern...)

Please help me asap.
Thanks a lot.
-Neha
Reply | Threaded
Open this post in threaded view
|

Re: How to ignore pamaters in URL

Emanuel
Administrator
If I remember my JSP/Servlets stuff, jsessionid is only added to the URL if the browser doesn't support cookies.  You can try enabling cookies, or configure your application server to not do jsessionid URL rewriting (eg: http://stackoverflow.com/questions/962729/is-it-possible-to-disable-jsessionid-in-tomcat-servlet  This is for Tomcat 6/7, although I'm sure other app servers have ways of configuring it.)
Reply | Threaded
Open this post in threaded view
|

Re: How to ignore pamaters in URL

danielfernandez
Administrator
Just a question... Emanuel, you know better but, is it normal that he's using a link expression (@{...}) for resolving a decorator? Link expressions are meant for being represented at the final markup, the one being rendered at the browser, not internal in-server use...
Reply | Threaded
Open this post in threaded view
|

Re: How to ignore pamaters in URL

Emanuel
Administrator
Yeah, you're right - I missed that.  The path to resolve a decorator should be the same as if you were resolving a template in a th:include/replace processor, which is not a full URL, but a path to the template in your project that's a combination of prefix + path + suffix.