2 Replies Latest reply on Oct 13, 2005 5:39 AM by Pangyan Wong

    Calling Servlets through Portlet doView(...)

    Pangyan Wong Newbie

      I have specified a servlet, and the "servlet-name" is "myServlet".

      "myServlet" will use the RequestDispatcher method and forward to a JSP page, "myJSP.jsp"

      I am using Portlet to call "myServlet", with the following code:

      PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/myServlet?action=myAction&name=myName");
      prd.include(request, response);

      The screen output is normal. However, when I check the server log, it shows "java.lang.ClassException", and it should be pointing to "myServlet" in the following code segment...
      RequestDispatcher rd = this.getServletContext().getRequestDispatcher("/myJSP.jsp");
      rd.forward(request, response);

      Can anyone help me solve this problem?

      Thank you very much!