how to add a httpservlet to jforum?
<p>I develop a web site based on Jforum, and my web page needs a json return. so i create a servlet which fulfill this. my problem is where to put this code() -- is net.jfourm.util.mine is  a good place? and how can i modify it to make it fit to jfourm. 
thanks.</p>

<pre><code>    package net.jforum.util.mine;

    import java.io.IOException;
    import java.io.PrintWriter;

    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;

    import java.util.ArrayList;
    import java.util.List;

    import net.sf.json.JSONArray;

    public class JsonServlet extends HttpServlet
    {
        private static final long serialVersionUID = 1L;

        public JsonServlet()
        {
            super();
        }

        public void init() throws ServletException
        {   
        }

        public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
        {
            int node = Integer.parseInt(request.getParameter("node"));

            response.setContentType("application/json");
            response.setCharacterEncoding("UTF-8");
            PrintWriter out = response.getWriter();

            JSONArray ja = new JSONArray();     
            ja = this.getMenu(node);
            out.println(ja.toString());     
        }

        protected void doGet(HttpServletRequest request,HttpServletResponse response )throws ServletException,IOException
        {
            doPost(request,response);
        }


        public JSONArray getMenu(int node) 
        { 
            List&lt;MenuBean&gt; list = new ArrayList&lt;MenuBean&gt;();

            MenuBean m[][] = new MenuBean[4][3];
            MenuBean l0[] = {new MenuBean("1", "service", false, "folder"), new MenuBean("2", "system", false, "folder"), new MenuBean("3", "statistics", false, "folder")};
            MenuBean l1[] = {new MenuBean("21000", "aaaa", true, "file", "test/show/arg1/arg2.page"), new MenuBean("22000", "aaaa", true, "file"), new MenuBean("23000", "hhhh", true, "file")};    
            MenuBean l2[] = {new MenuBean("11000", "cccc", true, "file"), new MenuBean("12000", "eeee", true, "file"), new MenuBean("13000", "gggg", true, "file")};
            MenuBean l3[] = {new MenuBean("31000", "bbbb", true, "file"), new MenuBean("32000", "dddd", true, "file")};

            m[0] = l0;
            m[1] = l1;
            m[2] = l2;
            m[3] = l3;      

            for(int i = 0; i &lt; m[node].length; i++){
                 list.add(m[node][i]);
            }

            JSONArray ja = JSONArray.fromObject(list);      

            return ja;
        }    
    }        
</code></pre>
