6 Replies Latest reply on Jun 13, 2005 11:26 AM by mholzner

    how to write a JSP only portlet

    natbox

      Hi,
      I would like to write a JSP only portlet for simplicity and ease of maintenance. I am wondering what class should put in the <porlet-class></portlet-class> in portlet.xml to make this work. I am using jboss AS 4.0.2 and jboss portal 2.0RC2. Thanks!

        • 1. Re: how to write a JSP only portlet
          martingi

          It shouldn't be possible to use JSP or servlets, because the starting point of a portlet application needs to implement the Portlet interface. But maybe it would be interesting to specify something like Java Portal Pages to offer some scripting possibilities.

          • 2. Re: how to write a JSP only portlet

            while it is easy to script the rendering phase, how do you script the processAction ?

            • 3. Re: how to write a JSP only portlet
              martingi

              I didn't get that much into this ;-(
              But couldn't you use/extend the portlet tag lib for actionrequests?

              • 4. Re: how to write a JSP only portlet

                the request dispatcher is not available during the processAction

                • 5. Re: how to write a JSP only portlet
                  martingi

                  This is getting difficult for me... I tried to do some analogical reasoning between JSP (get/ post requests) and portal pages (render/ action requests). But this doesn't seem to work, because get/ post requests of a JSP are not compiled into a servlet's doGet/ doPost methods, but rather into a single _jspService method.

                  But wouldn't it be possible to compile a java portal page (jpp) into some Portlet type with a _jppService method? If you would mark a scriptlet in the jpp with an element which includes attributes like the method name and request type you could compile a portlet which dispatches the request to the corresponding methods.

                  • 6. Re: how to write a JSP only portlet

                    sorry, but WTH ?

                    Let's start this over by asking: what is it that you try to acomplish?
                    You shoul duse portlets where they make sense, and JSPs where those make sense. Don't try to force fit things.