How to print mensagens in the source code of the page using thymeleaf?

Pena Pintada

This is my code using jsp and jstl:

 <!-- 
        Failed to access a URL: ${url}
        Exception: ${exception}
     -->

How to do the same using Thymeleaf? This code below dont work:

  <--  <p>Failed to access a URL: <span  th:text="${ url}"></span></p> 
    <p>Exception: <span th:text="${exception}"></span></p> -->

When I do not comment it show the message on page:

Failed to access a URL: http://localhost:8080/blog-spring-thymeleaf/auth/login

Exception: org.springframework.web.servlet.NoHandlerFoundException: No handler found for GET /blog-spring-thymeleaf/auth/login

holmis83

Use inlined expressions, double brackets:

<!-- 
        Failed to access a URL: [[${url}]]
        Exception: [[${exception}]]
    -->

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Python: how i can print all the source code by using Selenium

How to print source code of "IF" condition in "THEN"

how to set print page setup in code using javascript

How to change source code of page? using selenium and java

Get source code for a specific page using JavaScript

How to close the Print preview page with code

How to get html source code of a web page

Python WebDriver how to print whole page source (html)

Not able to print associated role with users in thymeleaf page

How to print Array size in thymeleaf?

How to get page source using selenium RC

How to let gdb print both source code corresponding disassembly together?

How can I pretty-print Java source code as a PDF?

How to print HTML source code TWIG view's

How do you print Xcode Swift source code in color?

thymeleaf renders additional <html> tags in source code

How to print the status code on the console using socket

How to print the results of this code using recursion?

Problem with getting source code of a web page using PHP curl

Error fetching source code from web page using eclipse

How to get page source as it is in browser and not in view page using selenium

How to build SonarLint source code using Maven?

How to compile the Zlib source code using Cmake

how to get rid of org.thymeleaf.exceptions.TemplateInputException: while using thymeleaf expression to print data in form of bootstrap cards?

the code of some page is cut when using curl or display the source code of the page

Is this possible to inject html code in utf-8 encoding to html page using thymeleaf and spring

selenium: How to get page source code after clicking a button

How to search for a specific keyword in html page source code with BeautifulSoup?

Chrome extension How to get source code of page from url