Package org.directwebremoting.servlet

Examples of org.directwebremoting.servlet.UrlProcessor


     * to the DWR engine.js to define the Tuscany SCADomain control functions and
     * functions for each SCA service and reference that use <binding.dwr>.
     */
    private void addScriptHandler() {

        UrlProcessor urlProcessor = (UrlProcessor)getContainer().getBean(UrlProcessor.class.getName());

        final EngineHandler engineHandler =
            (EngineHandler)getContainer().getBean(PathConstants.URL_PREFIX + "/engine.js");

        final Handler scaDomainScriptHandler = new Handler() {
            public void handle(HttpServletRequest request, HttpServletResponse response) throws IOException {
                PrintWriter out = response.getWriter();
                out.println("/** Apache Tuscany scaDomain.js Header */");

                engineHandler.handle(request, response);

                tuscanyFooter(request, out);
            }

        };

        // add the scaDomainScriptHandler to the urlProcessor
        // bit of a hack, there's probably cleaner way to get it registered
        urlProcessor.afterContainerSetup(new Container() {
            public Object getBean(String name) {
                return scaDomainScriptHandler;
            }
            public Collection getBeanNames() {
                return Arrays.asList(new String[] {PathConstants.URL_PREFIX + SCADOMAIN_SCRIPT_PATH});
View Full Code Here


     * to the DWR engine.js to define the Tuscany SCADomain control functions and
     * functions for each SCA service and reference that use <binding.dwr>.
     */
    private void addScriptHandler() {

        UrlProcessor urlProcessor = (UrlProcessor)getContainer().getBean(UrlProcessor.class.getName());

        final EngineHandler engineHandler =
            (EngineHandler)getContainer().getBean(PathConstants.URL_PREFIX + "/engine.js");

        final Handler scaDomainScriptHandler = new Handler() {
            public void handle(HttpServletRequest request, HttpServletResponse response) throws IOException {
                PrintWriter out = response.getWriter();
                out.println("/** Apache Tuscany componentContext.js Header */");

                engineHandler.handle(request, response);

                tuscanyFooter(request, out);
            }

        };

        // add the scaDomainScriptHandler to the urlProcessor
        // bit of a hack, there's probably cleaner way to get it registered
        urlProcessor.afterContainerSetup(new Container() {
            public Object getBean(String name) {
                return scaDomainScriptHandler;
            }
            public Collection<?> getBeanNames() {
                return Arrays.asList(new String[] {PathConstants.URL_PREFIX + SCRIPT_PATH});
View Full Code Here

     * to the DWR engine.js to define the Tuscany SCADomain control functions and
     * functions for each SCA service and reference that use <binding.dwr>.
     */
    protected void addScriptHandler() {

        UrlProcessor urlProcessor = (UrlProcessor)getContainer().getBean(UrlProcessor.class.getName());

        final EngineHandler engineHandler =
            (EngineHandler)getContainer().getBean(PathConstants.URL_PREFIX + "/engine.js");

        final Handler scaDomainScriptHandler = new Handler() {
            public void handle(HttpServletRequest request, HttpServletResponse response) throws IOException {
                PrintWriter out = response.getWriter();
                out.println("/** Apache Tuscany scaDomain.js Header */");

                engineHandler.handle(request, response);

                tuscanyFooter(request, out);
            }

        };

        // add the scaDomainScriptHandler to the urlProcessor
        // bit of a hack, there's probably cleaner way to get it registered
        urlProcessor.afterContainerSetup(new Container() {
            public Object getBean(String name) {
                return scaDomainScriptHandler;
            }
            public Collection getBeanNames() {
                return Arrays.asList(new String[] {PathConstants.URL_PREFIX + SCADOMAIN_SCRIPT_PATH});
View Full Code Here

     * to the DWR engine.js to define the Tuscany SCADomain control functions and
     * functions for each SCA service and reference that use <binding.dwr>.
     */
    private void addScriptHandler() {

        UrlProcessor urlProcessor = (UrlProcessor)getContainer().getBean(UrlProcessor.class.getName());

        final EngineHandler engineHandler =
            (EngineHandler)getContainer().getBean(PathConstants.URL_PREFIX + "/engine.js");

        final Handler scaDomainScriptHandler = new Handler() {
            public void handle(HttpServletRequest request, HttpServletResponse response) throws IOException {
                PrintWriter out = response.getWriter();
                out.println("/** Apache Tuscany scaDomain.js Header */");

                engineHandler.handle(request, response);

                tuscanyFooter(request, out);
            }

        };

        // add the scaDomainScriptHandler to the urlProcessor
        // bit of a hack, there's probably cleaner way to get it registered
        urlProcessor.afterContainerSetup(new Container() {
            public Object getBean(String name) {
                return scaDomainScriptHandler;
            }
            public Collection getBeanNames() {
                return Arrays.asList(new String[] {PathConstants.URL_PREFIX + SCADOMAIN_SCRIPT_PATH});
View Full Code Here

        try
        {
            // set up the web context and delegate to the processor
            webContextBuilder.engageThread(container, request, response);

            UrlProcessor processor = container.getBean(UrlProcessor.class);
            processor.handle(request, response);
        }
        finally
        {
            webContextBuilder.disengageThread();
        }
View Full Code Here

    /* (non-Javadoc)
     * @see org.directwebremoting.ServerContext#getContextPath()
     */
    public String getContextPath()
    {
        UrlProcessor urlProcessor = container.getBean(UrlProcessor.class);
        return urlProcessor.getContextPath();
    }
View Full Code Here

     * to the DWR engine.js to define the Tuscany SCADomain control functions and
     * functions for each SCA service and reference that use <binding.dwr>.
     */
    protected void addScriptHandler() {

        UrlProcessor urlProcessor = (UrlProcessor)getContainer().getBean(UrlProcessor.class.getName());

        final EngineHandler engineHandler =
            (EngineHandler)getContainer().getBean(PathConstants.URL_PREFIX + "/engine.js");

        final Handler scaDomainScriptHandler = new Handler() {
            public void handle(HttpServletRequest request, HttpServletResponse response) throws IOException {
                PrintWriter out = response.getWriter();
                out.println("/** Apache Tuscany scaDomain.js Header */");

                engineHandler.handle(request, response);

                tuscanyFooter(request, out);
            }

        };

        // add the scaDomainScriptHandler to the urlProcessor
        // bit of a hack, there's probably cleaner way to get it registered
        urlProcessor.afterContainerSetup(new Container() {
            public Object getBean(String name) {
                return scaDomainScriptHandler;
            }
            public Collection getBeanNames() {
                return Arrays.asList(new String[] {PathConstants.URL_PREFIX + SCADOMAIN_SCRIPT_PATH});
View Full Code Here

     * to the DWR engine.js to define the Tuscany SCADomain control functions and
     * functions for each SCA service and reference that use <binding.dwr>.
     */
    private void addScriptHandler() {

        UrlProcessor urlProcessor = (UrlProcessor)getContainer().getBean(UrlProcessor.class.getName());

        final EngineHandler engineHandler =
            (EngineHandler)getContainer().getBean(PathConstants.URL_PREFIX + "/engine.js");

        final Handler scaDomainScriptHandler = new Handler() {
            public void handle(HttpServletRequest request, HttpServletResponse response) throws IOException {
                PrintWriter out = response.getWriter();
                out.println("/** Apache Tuscany scaDomain.js Header */");

                engineHandler.handle(request, response);

                tuscanyFooter(request, out);
            }

        };

        // add the scaDomainScriptHandler to the urlProcessor
        // bit of a hack, there's probably cleaner way to get it registered
        urlProcessor.afterContainerSetup(new Container() {
            public Object getBean(String name) {
                return scaDomainScriptHandler;
            }
            public Collection getBeanNames() {
                return Arrays.asList(new String[] {PathConstants.URL_PREFIX + SCADOMAIN_SCRIPT_PATH});
View Full Code Here

     * to the DWR engine.js to define the Tuscany SCADomain control functions and
     * functions for each SCA service and reference that use <binding.dwr>.
     */
    private void addScriptHandler() {

        UrlProcessor urlProcessor = (UrlProcessor)getContainer().getBean(UrlProcessor.class.getName());

        final EngineHandler engineHandler =
            (EngineHandler)getContainer().getBean(PathConstants.URL_PREFIX + "/engine.js");

        final Handler scaDomainScriptHandler = new Handler() {
            public void handle(HttpServletRequest request, HttpServletResponse response) throws IOException {
                PrintWriter out = response.getWriter();
                out.println("/** Apache Tuscany scaDomain.js Header */");

                engineHandler.handle(request, response);

                tuscanyFooter(request, out);
            }

        };

        // add the scaDomainScriptHandler to the urlProcessor
        // bit of a hack, there's probably cleaner way to get it registered
        urlProcessor.afterContainerSetup(new Container() {
            public Object getBean(String name) {
                return scaDomainScriptHandler;
            }
            public Collection getBeanNames() {
                return Arrays.asList(new String[] {PathConstants.URL_PREFIX + SCADOMAIN_SCRIPT_PATH});
View Full Code Here

  @Override
  protected void doPost(HttpServletRequest req, HttpServletResponse resp)
      throws ServletException, IOException {
    try {
      webContextBuilder.set(req, resp, getServletConfig(), getServletContext(), container);
      UrlProcessor processor = (UrlProcessor) container.getBean(UrlProcessor.class.getName());
      processor.handle(req, resp);
    } finally {
      webContextBuilder.unset();
    }
  }
View Full Code Here

TOP

Related Classes of org.directwebremoting.servlet.UrlProcessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.