Fatwire内容仅在发布后第一次获得

时间:2013-06-05 12:44:11

标签: java spring spring-mvc fatwire

@Autowired
private xxx abc;

protected void doGet(HttpServletRequest request,
        HttpServletResponse response) throws ServletException, IOException {
    doPost(request, response);
}

protected void doPost(HttpServletRequest request,
        HttpServletResponse response) throws ServletException, IOException {
    System.out.println("Inside the do Servlet!!!");
    String pageId = request.getParameter("pageId");
    abc.resetSessionVariables();
    FatwireContent content=new FatwireContent();
    abc.setFatwireContent(content);

    System.out.println(abc.retrieveFatWireContent(
                    "xxxx", "xxxx"));

    abc.getFatwireContent().setImportantinformation(
            abc.retrieveFatWireContent(
                    "xxxx", "xxxx"));
    abc.getFatwireContent().setMainlegalfootnote(
            abc.retrieveFatWireContent(
                    "xxxx", "xxxx"));
    abc.getFatwireContent().setMethodology(
            abc.retrieveFatWireContent(
                    "RetirementAdvisorTool", "Methodology"));
    abc.getFatwireContent().setThingstoImproveOutcome(abc.retrieveFatWireContent(
                    "xxxx", "xxxx"));




    if (pageId != null && "Step1".equals(pageId))
        response.sendRedirect("xxxx.faces");
    else
        response.sendRedirect("xxxx.faces");
}

以上代码仅在公布后第一次填充fatwire内容。所有其他时间,我可以看到fatwire内容被打印,但页面上没有任何内容。 fatwire内容正在检索普通的htmls。是否与jsp compliation生命周期有关?

1 个答案:

答案 0 :(得分:1)

Logging the invoked managed bean action in a PhaseListener

在阶段监听器中添加了方法,现在它正常工作。