RE: Change in behavior in Freemarker portlet 7.0E GA1 to 7.3.2 ga3

thumbnail
Pete Helgren, modified 5 Years ago. Regular Member Posts: 225 Join Date: 4/7/11 Recent Posts
I have a Freemarker portlet that works fine when deployed to 7.3.0 ga1 but seems to be missing css, template and javascript references when deployed to 7.3.2 ga3.  Nothing unusual in coding.  The portlet code uses references like:
com.liferay.portlet.header-portlet-css=/css/main.css
 
for css and 
com.liferay.portlet.footer-portlet-javascript=/js/classlist.js

when referencing JavaScript  I set my template path to "/".  I do use an "include" statement to select between two different templates  in the actual portket code like so (which works when deployed to 7.3.0)

    // The basic logic here is that when we have a single portlet with multiple pages 
    // We need to make a decision about which page to display hence the use of "render"
    
    @Override
    public void render(RenderRequest request, RenderResponse response)
            throws PortletException, IOException {
        
        HttpServletRequest h2request = PortalUtil.getHttpServletRequest(request);
        HttpServletRequest orequest = PortalUtil.getOriginalServletRequest(h2request);
        String param = StringUtils.checkNull(orequest.getParameter("processmode"));
        
           if(param.length()>0 && param.equals("classlist"))   
               include("/templates/classinfo.ftl", request, response);
           else
               include("/templates/members.ftl", request, response);
    }

But what I see in the dev studio console when debugging is: 
2020-06-15 13:03:56.732 ERROR [http-nio-9080-exec-7][FreeMarkerPortlet:81] /templates/members.ftl is not a valid include
2020-06-15 13:03:57.023 WARN  [http-nio-9080-exec-10][code_jsp:173] {code="404", msg="Not Found", uri=/o/org.mydomain.myportlet/css/main.css}

I also don't see any of my JavaScript in the source view in the browser console.  It's almost as though the base reference to the Freemarker portlet isn't correct.  I checked for breaking changes and I really didn't see anything that might cause this behavior.  Is there anyone else out there using Freemarker as the view and experiencing something like this?  Can't seem to find a correct incantation...
thumbnail
Pete Helgren, modified 5 Years ago. Regular Member Posts: 225 Join Date: 4/7/11 Recent Posts
I am going to reply to myself here.  I am not exactly sure how this was sorted out.  It may have been a result for running a clean and then deploy but I have to admit it was very strange while I was trying to sort it out.
In any case  except for the clean and it also looks like I moved the templates folder out of META-INF/resources and back to src/main/resources.  Maybe that fixed it.  Maybe it was something else