6 Replies Latest reply on Nov 6, 2007 10:58 PM by diegocoronel

    Seam with multiple web pages

    schradermj11

      I am seriously considering moving all of my web applications over to Seam from Struts. I know it is going to be possible to do this, but I wanted to get some thoughts from the experts out there. I have already installed JBoss AS 4.2.2 and installed NetBeans as a Java 5.0 EE Seam development tool. I also have a pretty good idea how to structure a .ear to be used as a singe site deployment. My question relates to having multiple sites with similar structures.

      What I have as a scenario is a central site that I want to be the admin page of sorts. It provides admin capabilites to my organization to update content on various sites. It also should be the access point for the actual pages to dynamically show content.

      So I have multiple pages that get their content from the central application, but I don't want them all deployed in the single .ear. Actually I think the best way to do this is to have one .ear that handles the actual business logic, and multiple wars to simply read data from the central site, and display it to JSPs. So what is the best way that Seam can handle this. I am assuming the outside sites cannot be Seam, or shouldn't be to eliminate code duplication. They won't contain the EJBs and such.

      There are a couple of ways I have thought of to implement this. The central site could either produce xml files and return them to be parsed by the exernal sites which would give the other sites huge control over displaying the content, but would require more logic. Or I could return html formatted components which would reduce flexibility, but make the job easier on the client end.

      Or am I missing something completely and I could do this a much different Seam oriented way. Please post your thoughts, all help is appreciated :)

        • 1. Re: Seam with multiple web pages
          modoc

          I'm unsure as to why you want pages to live outside of the ear? If you have multiple sites or applications sure, but pages? If there are logical groupings why not just deploy multiple wars in the ear?

          I know that doesn't answer your question, but I'm not sure what probably you're really trying to solve.

          • 2. Re: Seam with multiple web pages
            schradermj11

            What I meant is I do have multiple sites. But I want those sites to pull their data from the Admin page. The reason I'm posting this is because I know my way of doing this might not be the best solution so fire away with ideas :)

            • 3. Re: Seam with multiple web pages
              pmuir

              As devon says, multiple war's in a single ear is the simplest solution. Alternatively you can use remote ejb interfaces to communicate between applications and use Seam/EJB3 in each application.

              • 4. Re: Seam with multiple web pages
                diegocoronel

                this is the question i tried to do a few days ago, so, if i got multiple war´s in same EAR can i have 1 authentication ? because it wasnt working with multiple ear's.

                again, sry about my english ... :)

                • 5. Re: Seam with multiple web pages
                  shane.bryzak

                   

                  "DiegoCoronel" wrote:
                  this is the question i tried to do a few days ago, so, if i got multiple war´s in same EAR can i have 1 authentication ? because it wasnt working with multiple ear's.


                  What wasn't working? Was an exception being thrown?

                  • 6. Re: Seam with multiple web pages
                    diegocoronel

                    There was no exceptions, the problem is that i have 2 wars, /segurancaWeb and /generalWeb, my segurancaWeb use authenticator and im doing the login normally, when im in /generalWeb and try to use s:hasRole('xxx') my roles arent in the context, it is like i need to login again, when i come back to /segurancaWeb/ any page my login is ok... so, i wanna something like JAAS, all my roles to be visible in all wars /segurancaWeb/ and /generalWeb/ with 1 authenticar, i need single sign on, is there any way to do that ?