3 Replies - 179 Views - Last Post: 17 November 2017 - 06:56 AM

#1 unknownusernameunderdog  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 58
  • Joined: 03-July 17

thymeleaftemplate doesn't work properly eclipse

Posted 17 November 2017 - 04:44 AM

Hi I have problem with template access by controller in spring tool is: eclipse
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Loading Image</title>
</head>
<body>
	<div class="row" layout:fragment="Content">  //here??
		<h2 class="indigo-text center">Loading Image</h2>
			<form th:action="@{/upload}"method="post" enctype="multipart/form-data" class="col m8 s12 offset-m2">
				<div class="input-field col s6">
					<input type="file id="file" name="file"/></div>
				<div class="col s6 center">
					<button class="btn indigo waves-effect waves-light" type="submit" name="save" th:text="#{submit}">
							<i class="mdi-content-send right"></i>
					</button>
				</div>
			</form>
	</div>
</body>
</html>



It is my template and don't know where error occured.

Is This A Good Question/Topic? 0
  • +

Replies To: thymeleaftemplate doesn't work properly eclipse

#2 andrewsw  Icon User is online

  • blow up my boots
  • member icon

Reputation: 6444
  • View blog
  • Posts: 26,066
  • Joined: 12-December 12

Re: thymeleaftemplate doesn't work properly eclipse

Posted 17 November 2017 - 05:55 AM

What does "doesn't work properly" mean? Explain what happens, or doesn't happen, and provide any error details.

If there are instructions or a sample that you are following then provide a link to this and, preferably, a link to the template. (It is unlikely that members have specific experience with that template and they shouldn't have to hunt around for information that you can link to.)
Was This Post Helpful? 0
  • +
  • -

#3 unknownusernameunderdog  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 58
  • Joined: 03-July 17

Re: thymeleaftemplate doesn't work properly eclipse

Posted 17 November 2017 - 06:26 AM

in Http browser when trying acess controller output is:
Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Fri Nov 17 14:20:15 CET 2017
There was an unexpected error (type=Internal Server Error, status=500).
Exception parsing document: template="upload", line 6 - column 3



@Controller
public class PictureUploadController {
	public static final Resource PICTURES_DIR=new FileSystemResource("C:\\LukasPictures"); // Change it to the dircetory
	@RequestMapping("/upload")
	public String uploadPage() {
		return "upload";
	}
...
}


upload.html is placed in src/main/resources/ templates
Regards
Was This Post Helpful? 0
  • +
  • -

#4 ndc85430  Icon User is online

  • I think you'll find it's "Dr"
  • member icon

Reputation: 654
  • View blog
  • Posts: 2,712
  • Joined: 13-June 14

Re: thymeleaftemplate doesn't work properly eclipse

Posted 17 November 2017 - 06:56 AM

At the very least, you probably need to declare the namespace for layout.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1