• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

using XHTML & JSP in the same application

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!

 
Ranch Hand
Posts: 199
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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) :
 
These are not the droids you are looking for. Perhaps I can interest you in a tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic