9 Replies Latest reply on Oct 30, 2007 1:40 PM by claprun

    Redirects in doView

    amin-mc

      Hi,

      I have just started looking at Portal technology and looking at using JBoss portal for a prototype. I have a question which i have searched on google but no luck. Is it possible to do a redirect in the doView(..) method of a portlet? I have a simple portlet which i want to redirect the user to an external resource (url). I have overriden processAction(..) but that does not get called.

      Any help would be much appreciated.

        • 1. Re: Redirects in doView
          claprun

          Portlets are not meant to redirect to external resources... For example, if the resource contains links, what would happen? Links have to be under the control of the portal server for it to be able to do its work. There are ways to achieve some kind of result, though, but they all have issues: use an iframe in your portlet markup, use a web clipping framework...

          • 2. Re: Redirects in doView
            amin-mc

            Hi,

            Thanks for the reply. Basically I have three web apps and i would like to present the user with one place where he/she can see all three apps. I wasn't sure whether i should convert the existing web apps into portlets or just have a thin layer/proxy that delegates to the web app. The web app would reside inside the same container. I have not worked with portlets before but it seems like the right answer for the use case.

            Thanks

            • 3. Re: Redirects in doView
              amin-mc

              Hi again

              I think redirect may not be the right word. What i need to do is render content from a different web application which will reside in the same servlet container.


              Thanks

              • 4. Re: Redirects in doView
                claprun

                The best way to proceed would be to convert your web apps to portlets. Depending on the technology used and how they were written, it could be fairly easy to do so. It might also be tricky... I would advise you to read our documentation.
                Welcome to Portal!

                • 5. Re: Redirects in doView
                  maruthig

                  thank u guyes all u did a great help to me

                  • 6. Re: Redirects in doView
                    amin-mc

                    Thanks for the advice. I was wondering whether it's possible to do the following:

                    1) Create a ViewPortlet.java which basically refers to an action

                    2) Add configuration files

                    3) Add necessary libraries.

                    I will have a look at the documentation but on a high level whether this is a possible option.

                    Thanks

                    • 7. Re: Redirects in doView
                      amin-mc

                      Hi again,

                      One a seperate note. I have been looking on the web but i could'nt find anything on the topic. At runtime i presume you can change the mode/state of the portlet window. But (this is probably not possible) is it possible to change/replace a portlet window from interacting with another portlet. For example

                      Portlet A
                      Portlet B
                      Portlet C
                      Portlet D
                      Portlet E

                      Currently I can see A, B and C, D. If i interact with D is it possible to change C to E? Or is the only option is to change the content of C?

                      Not sure if that made sense!

                      • 8. Re: Redirects in doView
                        claprun

                         

                        "amin-mc" wrote:

                        1) Create a ViewPortlet.java which basically refers to an action


                        What do you call "action"? A Struts action? In that case, you might want to the Struts bridge...

                        • 9. Re: Redirects in doView
                          claprun

                           

                          "amin-mc" wrote:
                          But (this is probably not possible) is it possible to change/replace a portlet window from interacting with another portlet. For example

                          Portlet A
                          Portlet B
                          Portlet C
                          Portlet D
                          Portlet E

                          Currently I can see A, B and C, D. If i interact with D is it possible to change C to E? Or is the only option is to change the content of C?

                          Not sure if that made sense!


                          It might be possible using Portal's API (though I haven't tried to do so) but your portlets would not be JSR-168 compliant anymore. There is nothing in the JSR 168 specification to do what you want. Actually, inter-portlet communication (IPC) is outside of the specification so any coordination of work between portlets you are trying to do would have to use a vendor-specific mechanism. This is true for JBoss Portal, but it would also be the case with any other portal vendor.