This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
I want to use JSF2 in my existing project based on JSP/Servlet
I started migrating my olds JSPs on xhtml pages, when I try to navigate from page1.xhtml to page2.jsp, page extension change automatically to page2.xhtml
And then, I have this error message: /jsp/page2.xhtml Not Found in ExternalContext as a Resource
Which is logical, because there is not page2.xhtml
in page1.xhtml i have something like this
in my faces-config.xml i have this navigation rule :
in web.xml, I use 2 servlets mapping :
- *.xhtml for Faces Servlet - *.jsp for old Servlet
If I understand your problem correctly you are not using any "JSF stuff" on your jsp pages? I presume so since in your web.xml you use normal servlets for jsp pages.
In that case you do not need to use the p:commandLink or any other "JSF stuff" to move from JSF page to normal JSP page. You can use pure html.
Sorry if I did not understand your problem
Mohamed Hedi Abidi
Joined: Jun 28, 2011
thanks Ilari Moilanen,
I have found the solution,
The problem is that faces-config.xml is used automatically by Faces Servlet, that's why I am redirected to page2.xhtml
Many nice ways to solve the problem :
- in baking bean:
- or using html in jsf page (like you did) :
subject: using XHTML & JSP in the same application