1 Reply Latest reply on Sep 18, 2006 11:33 PM by Jack Park

    Ajax Provider Servlet question

    Jack Park Newbie

      Situation: JBoss Portal AS 2.4.0
      Homegrown portlet that feeds from a JCR backside.
      Desire:
      Feed an index page that loads content from an AJAX servlet.
      Following the example, my portlet which appears as:
      /portal/portal/default/BrainInfo
      which is showing in a window called NeuroNamesPortletWindow
      thus: a PortletURL looks like:
      /portal/portal/default/BrainInfo/NeuroNamesPortletWindow?action=2

      In the Ajax example, it uses the JSPPortlet and a Servlet class.
      The webxml in that war file calls for this pattern:
      <url-pattern>/InvoiceServlet</url-pattern>
      and the html to call that servlet is:
      "/AJAXPortlet/InvoiceServlet?invoice=" + select.value

      In my case, use the pattern:
      <url-pattern>/NeuronamesAjaxServlet</url-pattern>
      and try calling it with this html:
      "/BrainInfo/NeuronamesAjaxServlet?tree=" + select.value

      That does not fire up the servlet
      I have experimented with different combinations, from:
      /portal/portal/default/BrainInfo/... and so on,
      Those occasionally return the entire portal homepage or sometimes the portlet page itself, but never a peep from the servlet.

      All that to say that my WEB-INF mimics that of the AJAX demo portlet, but my servlet never fires when called.

      I should say that a difference is that my servlet doGet actually queries the backside and returns the html snippets directly.

      I would greatly appreciate some ideas on how to call that servlet.
      Many thanks
      Jack

        • 1. Re: Ajax Provider Servlet question
          Jack Park Newbie

          Oh my gosh!
          Just after I posted, something hit me, and I solved the problem.

          Here's the solution. Pretty simple, actually.
          While my portlet displays as BrainInfo, it is actually housed in the war as "neuronamesportlet". The solution is to call the servlet with:
          /neuronamesportlet/NeuronamesAjaxServlet?tree...

          Well, I get to thank you all for providing me a place to articulate my story and think it through. Is that paired programming or what?

          Cheers
          Jack