actually I am trying to do new form in html , when i click a new link in home page. My code is like below.
1) In the \site\src\main\webapp\WEB-INF\templates\layout\partials\header.html file
<a class="account" th:href="@{/chanduform}">New form...</a>
2) In the \site\src\main\java\com\heatclinic\controller\account\LoginController.java file
@RequestMapping("/chanduform")
public ModelAndView chanduForm(){
//String message = "Hello World, Spring 3.0!!!";
System.out.println("Chandu new form ....");
String message = "Hello World, Spring 3.0!!!";
return new ModelAndView("chanduform", "message", message);
}
3) and i had created new file site\src\main\webapp\WEB-INF\templates\authentication\chanduform.html
Code: Select all
<div id="account">
<div id="register">
<h3>Register for an Account</h3>
<p>Don't have an account yet? Sign up for one now to gain access to all our member tools.</p>
</div>
</div>
when i am clicking on the link I am getting this error... what happens exactly did not getting ...
HTTP ERROR 500
Problem accessing /chanduform. Reason:
Error resolving template "chanduform", template might not exist or might not be accessible by any of the configured Template Resolvers (layout/partials/head:8)
Caused by:
org.thymeleaf.exceptions.TemplateInputException: Error resolving template "chanduform", template might not exist or might not be accessible by any of the configured Template Resolvers (layout/partials/head:8)
at org.thymeleaf.TemplateRepository.getTemplate(TemplateRepository.java:247)
at org.thymeleaf.fragment.FragmentAndTarget.extractFragment(FragmentAndTarget.java:147)
at org.thymeleaf.processor.attr.AbstractFragmentHandlingAttrProcessor.processAttribute(AbstractFragmentHandlingAttrProcessor.java:70)
at org.thymeleaf.processor.attr.AbstractAttrProcessor.doProcess(AbstractAttrProcessor.java:74)
at org.thymeleaf.processor.AbstractProcessor.process(AbstractProcessor.java:212)
at org.thymeleaf.dom.Node.applyNextProcessor(Node.java:896)
at org.thymeleaf.dom.Node.processNode(Node.java:858)
at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:639)
at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:621)
at org.thymeleaf.dom.Node.processNode(Node.java:876)
at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:639)
at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:621)
.......................
Please help me .. i tried in internet to solve this problem .. but i unable to solve this ...
Thanks in advanced
chandu