Discussions

Web tier: servlets, JSP, Web frameworks: servlet to jsp

  1. servlet to jsp (1 messages)

    My servlet calls the jsp and I have this in my servlet... if flag is true it should call a page... The page just does not show up on the browser... I just cant get any reason why ... ?

    if (flag == true)
    {

    System.out.println("Request TicketAddedReg.jsp");--PRINTS THIS
    RequestDispatcher rd = null;
    rd = getServletConfig().getServletContext().getRequestDispatcher("/TicketAddedReg.jsp");
    if (rd!=null)
    System.out.println("Sent TicketAddedReg.jsp");--PRINTS THIS
    rd.forward(request,response);
    ---WHEN THE SERVLET TRIES TO LOAD THIS PAGE THERE IS NOTHING SEEN ON BROWSER.. and no exceptions or errors shown...
    }
    else
    {
    //THIS PART WORKS FINE AND CALLS THE JSP PAGE
    System.out.println("Request TicketAdded.jsp");
    RequestDispatcher rd = null;
    rd = getServletConfig().getServletContext().getRequestDispatcher("/TicketAdded.jsp");
    if (rd!=null)
    rd.forward(request,response);
    }

    MY JSP Page contains just html tags right now.. I am using j2ee server and deploytool

    Threaded Messages (1)

  2. servlet to jsp[ Go to top ]

    There is something wrong with TicketAddedReg.jsp.As a test just rename TicketAdded.jsp to TicketAddedReg.jsp and try.
    /Jyot