0

Code(use V0.0.2)

https://github.com/vikashsaini01/TaskFirst/tree/V0.0.2

Reffered this question for solution and tried to implement it but it didnt work.

https://stackoverflow.com/questions/28480223/using-both-thymeleaf-and-jsp

I am trying to implement a simple spring security project. I ended up having both thymleaf and jsp in my project :) . I referred the above url for solving this and tried to copy the configuration in xml as java configuration. But it is not working. If i use thymleaf jar in pom, jsp stops working. and if i configure view resolver thymleaf stops working. One more thing ServletContextTemplateResolver doesnt have setViewNames(String..), So I configured setName(String) for this.

Can I get help to make below two work.

http://localhost:8080/tasks (in folder TaskFirst\src\main\webapp\WEB-INF\jsp\tasks.jsp) http://localhost:8080/home (in folder TaskFirst\src\main\resources\templates\home.html)

Vikash
  • 2,046
  • 3
  • 23
  • 30
  • Why are you mixing view technologies (generally a bad idea/decision to do). Also are you creating a jar or a war and you shouldn't be manually configuring anything (as that will disable one or the other). – M. Deinum Sep 06 '17 at 12:18
  • @M.Deinum 1. just trying this way as I earlier I had some thymleaf now trying to add some jsp pages 2. It's a spring boot project, So I am running it directly from Eclipse as a java application. (On packaging it would be jar) 3. I didnt understand what you mean by this "you shouldn't be manually configuring anything" , Is there any other way than manually configuring. . Thanks! – Vikash Sep 06 '17 at 15:28
  • 1
    Spring Boot will do auto configuration, JSP won't work in a JAR you need a WAR. But again why on earth try to use JSP. You already have a very nice framework for your UI I strongly suggest to use that instead of trying to mix multiple UI frameworks. – M. Deinum Sep 07 '17 at 05:57

0 Answers0