This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes JSF and the fly likes How to 'include' a JSF file in a JSP file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "How to Watch "How to New topic

How to 'include' a JSF file in a JSP file?

Abhishek Asthana
Ranch Hand

Joined: Sep 08, 2004
Posts: 146

All of our existing JSP files are 'ordinary' JSP files, i.e. they don't have any JSF component. A simple 'ordinary' JSP is like this:

It's url is : (Its name is 'index.jsp')

A JSF page (a JSP having JSF components) is like this:

And its URL is: (Its name is myjsf.jsp)

Note that both files are in same application 'myapp' but JSF page has JSF context also. So in myjsf.jsp we can include index.jsp without any problem. However if in index.jsp, I try to include myjsf.jsp we get an error:

Is this thing possible or is there any work around or is this a REALLLY BAD practice? Any answers will be helpful!

I agree. Here's the link:
subject: How to 'include' a JSF file in a JSP file?
It's not a secret anymore!