I have created web-application using JSF 2.0 & JSP and facing some weird problem.
I have page in JSF where I have included JSP page. code are as below.
<o:resourceInclude path="detailedReports.jsp" />
Where o is omnifaces. xmlns:o="http://omnifaces.org/ui"
Now in JSP (detailedReports.jsp) I have code as below.
<h:form id="myForm" prependId="false">
<h:commandLink value="Take Me To Some Page" action="#{PersonalInformationDataBean.moveToApplicantRegisterPage()}" />
</h:form>
moveToApplicantRegisterPage() have below code
public String moveToApplicantRegisterPage() {
editedData = 1;
return takeMeToAnotherPage("registerForPatentss");
}
When I click on Take Me To Some Page link, I get directed to detailedReports.jsp and not to registerForPatentss.xhtml.
Any reason why this is happening? What should I do to get redirected to registerForPatentss.xhtml.
Note: While redirecting to registerForPatentss.xhtml, I also need to set the data of int editedData to 1.
I don’t think there is any solution. So what I did is, take JSP in JSF i.e. I re-wrote JSP content in JSF Format. So now I don’t have any JSP page.
All is working perfectly!!!