FreeMarker support for struts2 problem
I been trying IntelliJ idea latest. Working on demo project. Struts2+Freemarker.
Problem is IntelliJ doesn't recognize or path to when I use type="freemarker" in action result. But when I run project is working fine. See below screen shot. I see only com. If I remove type="freemarker" than I see the page listed fine.
Thanks
请先登录再写评论。
The directories containing freemarker results must be marked as source roots.
Thanks. That means need to make webapp as source root?
I'd suggest to create a directory e.g. "views" under WEB-INF and mark that as source root.
I have created views folder under WEB-INF and marked it as source root as in the screen shot. If I do that than I see index.ftl page but no directory structure like <result type="freemarker">/WEB-INF/views/index.ftl</result> instead I use <result type="freemarker">index.ftl</result>. Running the projects gives an error as below but if I use /WEB-INF/views/index.ftl that is not resolved as in screen shot but page is loading fine.
I hope you understand.
Stacktraces
Thanks for your detailed report, there was indeed a problem specific to Freemarker results which will be fixed in next EAP of IntelliJ IDEA 12. Then you'll be able to use "/WEB-INF/views/index.ftl" as full path without any additional source roots.