@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内容正在检索纯HTML。与jsp补全生命周期有关吗?
最佳答案
Logging the invoked managed bean action in a PhaseListener
在相位侦听器中添加了该方法,现在可以正常使用了。