Package javax.servlet

Examples of javax.servlet.RequestDispatcher.forward()


        request.setAttribute(PROP_Y, props.getProperty(PROP_Y, "0"));
        request.setAttribute(PROP_Z, props.getProperty(PROP_Z, "0"));
        request.setAttribute(ATTR_AUDIO, props.getProperty(PROP_AUDIO, AUDIO_DEFAULT));

        RequestDispatcher rd = getServletContext().getRequestDispatcher("/clientSettings.jsp");
        rd.forward(request, response);
    }

    protected void doEditCancel(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException
    {
View Full Code Here


        sorted.addAll(props.entrySet());

        request.setAttribute("props", sorted);

        RequestDispatcher rd = getServletContext().getRequestDispatcher("/clientProps.jsp");
        rd.forward(request, response);
    }

    protected void doEditCancel(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException
    {
View Full Code Here

        logger.fine("SIZE OF WELCOME REGISTRY: " +registry.size());
       
        request.setAttribute("WelcomeScripts", registry);
       
        RequestDispatcher rd = request.getRequestDispatcher("/index.jsp");
        rd.forward(request, response);
    }

    // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
    /**
     * Handles the HTTP
View Full Code Here

        if (isMultipart == false) {
            LOGGER.warning("Failed to upload module, isMultipart=false");
            String msg = "Unable to recognize upload request. Please try again.";
            request.setAttribute("errorMessage", msg);
            RequestDispatcher rd = request.getRequestDispatcher(redirect);
            rd.forward(request, response);
            return;
        }
        // Create a new file upload handler
        ServletFileUpload upload = new ServletFileUpload();
View Full Code Here

                        LOGGER.warning("Upload is not a jar file " + moduleJar);
                        String msg = "The file " + moduleJar + " needs to be" +
                                " a jar file. Please try again.";
                        request.setAttribute("errorMessage", msg);
                        RequestDispatcher rd = request.getRequestDispatcher(redirect);
                        rd.forward(request, response);
                        return;
                    }
                    String moduleName = moduleJar.substring(0, moduleJar.length() - 4);

                    LOGGER.info("Upload Install module " + moduleName +
View Full Code Here

                        /* Log an error to the log and write an error message back */
                        LOGGER.log(Level.WARNING, "Failed to save file", excp);
                        String msg = "Internal error installing the module.";
                        request.setAttribute("errorMessage", msg);
                        RequestDispatcher rd = request.getRequestDispatcher(redirect);
                        rd.forward(request, response);
                        return;
                    }

                    /* Add the new module */
                    Collection<File> moduleFiles = new LinkedList<File>();
View Full Code Here

                        /* Log an error to the log and write an error message back */
                        LOGGER.warning("Failed to install module " + moduleName);
                        String msg = "Internal error installing the module.";
                        request.setAttribute("errorMessage", msg);
                        RequestDispatcher rd = request.getRequestDispatcher(redirect);
                        rd.forward(request, response);
                        return;
                    }
                }
            }
        } catch (FileUploadException excp) {
View Full Code Here

            /* Log an error to the log and write an error message back */
            LOGGER.log(Level.WARNING, "File upload failed", excp);
            String msg = "Failed to upload the file. Please try again.";
            request.setAttribute("errorMessage", msg);
            RequestDispatcher rd = request.getRequestDispatcher(redirect);
            rd.forward(request, response);
            return;
        }
        /* Install all of the modules that are possible */
        manager.installAll();
View Full Code Here

        manager.installAll();
       
        /* If we have reached here, then post a simple message */
        LOGGER.info("Added module successfully");
        RequestDispatcher rd = request.getRequestDispatcher("/installSuccess.jsp");
        rd.forward(request, response);
    }
   
    /**
    * Returns a short description of the servlet.
    */
 
View Full Code Here

       
        // add the sorted list of registrations
        request.setAttribute("adminPages", adminPages);

        RequestDispatcher rd = request.getRequestDispatcher("/admin.jsp");
        rd.forward(request, response);
    }

    private AdminRegistration mapPage(String page) {
        if (page == null) {
            return null;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.