| Author |
using XHTML & JSP in the same application
|
Mohamed Hedi Abidi
Greenhorn
Joined: Jun 28, 2011
Posts: 3
|
|
Hi,
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
Can you help please!
|
 |
Ilari Moilanen
Ranch Hand
Joined: Apr 15, 2008
Posts: 197
|
|
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
Greenhorn
Joined: Jun 28, 2011
Posts: 3
|
|
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) :
|
 |
 |
I agree. Here's the link: jrebel
|
|
subject: using XHTML & JSP in the same application
|
|
|