Пример #1
0
            /// <exception cref="Javax.Servlet.ServletException"/>
            /// <exception cref="System.IO.IOException"/>
            protected override void DoGet(HttpServletRequest request, HttpServletResponse response
                                          )
            {
                PrintWriter          @out       = response.GetWriter();
                ICollection <string> sortedKeys = new TreeSet <string>();
                Enumeration <string> keys       = request.GetParameterNames();

                while (keys.MoveNext())
                {
                    sortedKeys.AddItem(keys.Current);
                }
                foreach (string key in sortedKeys)
                {
                    @out.Write(key);
                    @out.Write(':');
                    @out.Write(request.GetParameter(key));
                    @out.Write('\n');
                }
                @out.Close();
            }
Пример #2
0
 private Enumeration <string> GetParams(HttpServletRequest req)
 {
     return(req.GetParameterNames());
 }