question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Url with pathvariable

See original GitHub issue

Add support to pathvariable style to URL syntax, like spring:url tag, example:

    <a th:href="@{/order/details/{id}/{action}(id=3,action='show_all')}"> 

output:

<a href="/order/details/3/show_all"> 

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:24 (15 by maintainers)

github_iconTop GitHub Comments

3reactions
emilimecommented, Oct 17, 2012

I think it would be useful to have a method like this:

 <a th:href="@{/order/details/{id}/{action}(Object)}">

(where Object has properties “id” and “action”) which output the url as “/order/details/3/show_all”.

What do you think?

2reactions
danielfernandezcommented, May 23, 2017

@JetForMe @tholu plese note that, as of today, Thymeleaf should allow you to use a literal substitution there like th:href="@{|/users/${user.id}|}

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring mvc @PathVariable - Stack Overflow
I'm struggling in getting the right url to show the jsp page. Thanks. spring-mvc · Share.
Read more >
Spring @PathVariable - read URI template variable ... - ZetCode
@PathVariable is a Spring annotation which indicates that a method parameter should be bound to a URI template variable. If the method parameter ......
Read more >
Spring @PathVariable Annotation - Baeldung
Simply put, the @PathVariable annotation can be used to handle template variables in the request URI mapping, and set them as method parameters....
Read more >
Enhancing the Hello World Service with a Path Variable
The @PathVariable annotation is used to extract the value from the URI. It is most suitable for the RESTful web service where the...
Read more >
When Should You Use Path Variable and Query Parameter?
Also, you can get side effects. You don't have to define other URL and other query parameter to achieve basic CRUD functions.You change...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found