1 Reply Latest reply on May 16, 2008 5:00 AM by bcole

    JSPs working along side JSFs

    jakubhertyk

      Hi everybody,


      I am moving over to Seam from our current framework.  Due to a lot of legacy code, I need to make JSPs work along side JSFs.  This is proving rather difficult.  Currently the login is done through JSF, but after login the user needs to be redirected to a JSP.  Seam uses the .seam extension and ignores what ever extension is in pages.xml file.  For example if the login is called login.seam but after login I need to redirect to home.jsp then seam redirects to home.seam, which is obviously not there.  Is there a way to tell Seam to go to the page without mucking with the URL?


      Furthermore, when securing pages in pages.xml file by listing the folders that need a login, i.e. <page view-id=/private/* login-required=true/>, Seam is just protecting the JSF files in the listed folder and leaving all other files public.  What is the proper way to lock down a folder with all of it's contents?  Currently I had to write a filter that throws a NotLoggedInException on all JSP files when the user is not logged in.  This is very tedious and we loose the redirect to the page that the user requested originally, which we need.


      Thank you for your help,



      Jakub

        • 1. Re: JSPs working along side JSFs
          bcole

          Hi Jakub. Did you make any progress on the first point (ie. plain JSPs inside Seam/JSF)? I'm about to embark on a similar project.


          Obviously you can change the web.xml mapping for the seam filter to just include the new JSF pages, but I was hoping to keep the filter at "*", to save re-organising our existing JSF pages.


          Anyway, once you change the seam filter to not include your JSPs, plain HREFs seem to work ok. But I'm not sure how to make controller actions, redirected through pages.xml, work - they still have the .seam. Any advice appreciated ...


          thanks, Brian