2 Replies Latest reply on Jan 30, 2008 11:03 AM by peterj

    from view.jsp to view2.jsp

    foongkim

      hi there, i have downloaded the HelloWorldJSPPortlet as suggested by some of the experts here.

      i have started to trace the program and below is my finding and question. Please confirm/verify my conclusion if it's rigeht or wrtong.

      1. After i have successfully deployed a porlet, the first method that will be called is not define in WEB.XML file. There will be no welcom-list tag avaiable. The first method will be call is the doView() method.

      2. In order for me to structure the application, there is no MVC involve. If i need to perform any business transaction, i will required to create a class and initiate it in the Portlet program

      Q1: For sample project HelloWorldJSPPorlet, these 2 jsp pages, View.jsp and view2.jsp. i am wondering where is the connection between these 2 jsp file? How is the flow after i have submitted/press the submit in view.jsp and link to view2.jsp?

      Q2: If my point 1 is correct, i am surprise what happen if the portlet.xml file contain more than 1 portlet, how would be the flow be? Or is it possible to have more than 1 portlet in the portlet.xml? I read from the documentation that i can specify more than 1 portlet in the portlet.xml.
      file:///C:/jboss-foong/referenceGuide/html/tutorials.html


        • 1. Re: from view.jsp to view2.jsp
          foongkim

          dear all, i think from view.jsp to view2.jsp is through the processAction() method in the portlet.

          public void processAction(ActionRequest aRequest, ActionResponse aResponse)
          throws PortletException, IOException, UnavailableException
          {
          String sYourname = (String) aRequest.getParameter("yourname");

          // do something

          aResponse.setRenderParameter("yourname", sYourname);
          }

          But again, is it everytime processAction() will automatically call the doView() after that?? If not, where is the linkage between processAction() and doView()??

          thanks

          • 2. Re: from view.jsp to view2.jsp
            peterj

            Perhaps a book on portlet programming would help. You can download a free one from http://www.manning.com/hepper/.