// http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html#site-control
        // http://board.flashkit.com/board/showthread.php?t=782484

        protected override void doGet(HttpServletRequest req, HttpServletResponse resp)
        {
            try
            {
                var p = req.GetPathAndQuery();

                if (p.Length > UrlPattern.Length + 1)
                {
                    p = p.Substring(UrlPattern.Length + 1);
                }
                else
                {
                    p = "";
                }

                if ("zip" == p)
                {
                    resp.setContentType(ZIPFile.ContentType);
                    resp.getOutputStream().write((sbyte[])(object)GetContent());
                    resp.getOutputStream().flush();
                }
                else
                {
                    resp.setContentType("text/html");
                    resp.getWriter().println(Launch(p));
                    resp.getWriter().flush();
                }
            }
            catch (csharp.ThrowableException ex)
            {
                // either swallow of throw a runtime exception

                ((java.lang.Throwable)(object) ex).printStackTrace();
            }
        }
示例#2
0
        protected override void doGet(HttpServletRequest req, HttpServletResponse resp)
        {
            try
            {
                var PathAndQuery = req.GetPathAndQuery().Substring(UrlPattern.Length);

                // not allowed to do so:
                // http://groups.google.com/group/google-appengine/browse_thread/thread/68a480cb7bec869e
                // http://www.ozelwebtasarim.com/index.php/google/10004-google-app-engine-java-utf-8-character-encoding-problem
                //resp.setHeader("Content-Encoding", "utf-8");

                if (PathAndQuery.Length > 1)
                {
                    resp.setContentType("text/html; charset=utf-8");
                    resp.getWriter().println(Launch(PathAndQuery.Substring(1)));
                }
                else
                {
                    resp.setContentType("text/html; charset=utf-8");
                    resp.getWriter().println(Launch(null));
                }
            }
            catch
            {
                // either swallow of throw a runtime exception
            }
        }
        // http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html#site-control
        // http://board.flashkit.com/board/showthread.php?t=782484
        protected override void doGet(HttpServletRequest req, HttpServletResponse resp)
        {
            try
            {
                var p = req.GetPathAndQuery();

                if (p.Length > UrlPattern.Length + 1)
                    p = p.Substring(UrlPattern.Length + 1);
                else
                    p = "";

                if ("zip" == p)
                {
                    resp.setContentType(ZIPFile.ContentType);
                    resp.getOutputStream().write((sbyte[])(object)GetContent());
                    resp.getOutputStream().flush();
                }
                else
                {
                    resp.setContentType("text/html");
                    resp.getWriter().println(Launch(p));
                    resp.getWriter().flush();
                }
            }
            catch (csharp.ThrowableException ex)
            {
                // either swallow of throw a runtime exception

                ((java.lang.Throwable)(object)ex).printStackTrace();

            }
        }
        protected override void doGet(HttpServletRequest req, HttpServletResponse resp)
        {
            try
            {
                var PathAndQuery = req.GetPathAndQuery().Substring(UrlPattern.Length);

                // not allowed to do so:
                // http://groups.google.com/group/google-appengine/browse_thread/thread/68a480cb7bec869e
                // http://www.ozelwebtasarim.com/index.php/google/10004-google-app-engine-java-utf-8-character-encoding-problem
                //resp.setHeader("Content-Encoding", "utf-8");

                if (PathAndQuery.Length > 1)
                {
                    resp.setContentType("text/html; charset=utf-8");
                    resp.getWriter().println(Launch(PathAndQuery.Substring(1)));
                }
                else
                {
                    resp.setContentType("text/html; charset=utf-8");
                    resp.getWriter().println(Launch(null));
                }
            }
            catch
            {
                // either swallow of throw a runtime exception
            }
        }
        // http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html#site-control
        // http://board.flashkit.com/board/showthread.php?t=782484

        protected override void doGet(HttpServletRequest req, HttpServletResponse resp)
        {
            try
            {
                resp.sendRedirect(ToLocation(req.GetPathAndQuery()));
            }
            catch (csharp.ThrowableException ex)
            {
                // either swallow of throw a runtime exception

                ((java.lang.Throwable)(object) ex).printStackTrace();
            }
        }
        // http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html#site-control
        // http://board.flashkit.com/board/showthread.php?t=782484
        protected override void doGet(HttpServletRequest req, HttpServletResponse resp)
        {
            try
            {
                resp.sendRedirect(ToLocation(req.GetPathAndQuery()));
            }
            catch (csharp.ThrowableException ex)
            {
                // either swallow of throw a runtime exception

                ((java.lang.Throwable)(object)ex).printStackTrace();

            }
        }
        // http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html#site-control
        // http://board.flashkit.com/board/showthread.php?t=782484

        protected override void doGet(HttpServletRequest req, HttpServletResponse resp)
        {
            try
            {
                resp.setContentType("text/html");
                resp.getWriter().println(Launch(req.GetPathAndQuery()));
                resp.getWriter().flush();
            }
            catch (csharp.ThrowableException ex)
            {
                // either swallow of throw a runtime exception

                ((java.lang.Throwable)(object) ex).printStackTrace();
            }
        }
        // http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html#site-control
        // http://board.flashkit.com/board/showthread.php?t=782484
        protected override void doGet(HttpServletRequest req, HttpServletResponse resp)
        {
            try
            {
                resp.setContentType("text/html");
                resp.getWriter().println(Launch(req.GetPathAndQuery()));
                resp.getWriter().flush();
            }
            catch (csharp.ThrowableException ex)
            {
                // either swallow of throw a runtime exception

                ((java.lang.Throwable)(object)ex).printStackTrace();

            }
        }