You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> on 2006/10/09 11:07:26 UTC

Technically possible to merge a servlet/jsp environment with JSF

Is it technically possible to merge an existing application which use
Servlet+JSP and JSF together.
A complete Rework is not possible now, but in steps it would work.

So the question is, can i use JSF and old Servlets+JSP together ( means,
one old workflow will be upgraded to new JSF technology while the others
should stay, the Navigation of the old workflow is done by the old
engine, for the new ones by JSF).

The only thing i don't know, if the session and application scope data
can be "merged" - but it should be possible, should it?
Are there any breakpoints or blockers which i am not thinking of, any
hints for what problems and traps i should watch?

kind regards

Torsten


Re: Technically possible to merge a servlet/jsp environment with JSF

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi Torsten!
> Is it technically possible to merge an existing application which use
> Servlet+JSP and JSF together.
>   
Yes, it is. This is what we did with our application too. We also
wrapped the old pages in an JSF view so that we have a FacesContext
available for the whole application. Even the Header/Footer includes are
in JSF now, only the "content" is still JSP for the old pages. This is
where the f:verbatim tag comes in handy :-)

> A complete Rework is not possible now, but in steps it would work.
>   
Yep, same story here.

> So the question is, can i use JSF and old Servlets+JSP together ( means,
> one old workflow will be upgraded to new JSF technology while the others
> should stay, the Navigation of the old workflow is done by the old
> engine, for the new ones by JSF).
>   
It is possible, though, it might take some time until you figured out
how to build the navigation bridge between JSP/JSF, this heavily depends
on your old application. Well, and then the fact that JSF pages aren't
easily bookmarkable might also be a problem if you have to provide your
user something like a navigation history (breadcrumbs).

> The only thing i don't know, if the session and application scope data
> can be "merged" - but it should be possible, should it?
>   
These scopes are already "merged" the session scope in JSF is the same
as with JSP/Servlet.

Prepare for a lot of work, and the fact that you never ever would like
to edit your "old" JSP pages once you eaten the JSF drug ;-)

Ciao,
Mario