reset password
Author Message
aeshabana
Posts: 6
Posted 17:20 Feb 16, 2012 |

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        path = request.getParameter("path");
        request.setAttribute( "path", path );
        String time;
        Format formatter;
        Date date = new Date();
        formatter = new SimpleDateFormat("yyyy-MM-dd hh:mmaaa");
        time = formatter.format(date);
        request.setAttribute( "time", time );
        
        if( request.getSession().getAttribute( "name" ) == null ) {
            response.sendRedirect( "Login" );
            return;
        }
       
        request.getRequestDispatcher( "/WEB-INF/createWiki.jsp" ).forward( request, response );
    }

 

I would like to redirect the page after to "DisplayCreatedWiki.java"

but when i tried to do it it gave me an error

cysun
Posts: 2935
Posted 07:48 Feb 17, 2012 |

Be more specific - where in the code you had the redirect statement and what error you got.