6 Replies Latest reply on Apr 24, 2007 2:51 AM by ritesh_sanjay

    Simple JSP Portlet In the Ref Manual / reloading page

    bmcgovern

      on 2.4 bundled , I deployed the simple JSP Portlet and it worked fine. It asks you to fill in a value in a field and hit enter, the portlet sees if that value exists and echos it back out to you if so.

      When you reload the entire page, i expected the portlets' form to be displayed not the response. Why does that happen and how can i get around it. I have to write similar portlets

        • 1. Re: Simple JSP Portlet In the Ref Manual / reloading page
          bmcgovern

          <expiration-cache>0</expiration-cache> has no effect. Any ideas?

          • 2. Re: Simple JSP Portlet In the Ref Manual / reloading page
            antoine_h

            at the end of the doView, you can reset the parameters that are stored in the request (and that come from the formular in the page : the post param from the field).
            then, the portlet should not recognized that someone has yet given the value, and start again to ask the user to type a value.

            or you can set a parameter that say : I have yet printed the value.
            this parameter may be a hidden field of the form.

            hope it helps.

            • 3. Re: Simple JSP Portlet In the Ref Manual / reloading page
              ckeswani

               

              "Antoine_h" wrote:
              at the end of the doView, you can reset the parameters that are stored in the request (and that come from the formular in the page : the post param from the field).
              then, the portlet should not recognized that someone has yet given the value, and start again to ask the user to type a value.

              or you can set a parameter that say : I have yet printed the value.
              this parameter may be a hidden field of the form.

              hope it helps.


              How does one "reset" the parameters on a RenderRequest? I really need to do this and I can't find the correct method.

              • 4. Re: Simple JSP Portlet In the Ref Manual / reloading page
                ckeswani



                How does one "reset" the parameters on a RenderRequest? I really need to do this and I can't find the correct method.


                Actually, I've found the answer:
                request.getParameterMap().clear();

                • 5. Re: Simple JSP Portlet In the Ref Manual / reloading page
                  ckeswani

                   

                  "ckeswani" wrote:


                  How does one "reset" the parameters on a RenderRequest? I really need to do this and I can't find the correct method.


                  Actually, I've found the answer:
                  request.getParameterMap().clear();


                  This, in fact, does not work. An UnsupportedOperationException is thrown because the map returned by request.getParameterMap() is not modifyable. This is rather troublesome.

                  • 6. Re: Simple JSP Portlet In the Ref Manual / reloading page
                    ritesh_sanjay

                    Hi,
                    Can you pls tell me how to create and deploy JSP Portlet on JbossPortal.

                    I have created one Portal and not need to create one jsp portlet and iframe on that.
                    Please provide your inputs u have any idea on that.
                    Thanks in advance!

                    Ritesh.