This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Hi!! Good Folk's need help again!. I have a servlet which is invoked by a Html page. The Html page send's data to servlet which confirms with the database and get's the data. From here there is a simple welcome (JSP)page for the confirmed data logger's. But i am not able to get the JSP page. CODE IS:The Lower Part.. HttpSession userSession=req.getSession(true); userSession.setAttribute("userName",ar);
RequestDispatcher rd=getServletContext().getRequestDispatcher("http://localhost:8080/zz/jsp/welcome.jsp"); if (rd!=null) { rd.forward(req,res); } } catch(Exception e) { out.println("SQLException has occurred"+e.getMessage()); }}} The Error :--- Displayed. SQLException has Occurred Path http://localhost:8080/zz/jsp/welcome.jsp does not start with a "/" character --Thank's In advance. -Praveen
Mark Howard
Ranch Hand
Joined: Feb 14, 2001
Posts: 285
posted
0
Hi Parvin Check out the API for getRequestDispatcher, which has the following comment regarding the resource path:
The pathname must begin with a "/" and is interpreted as relative to the current context root. This method returns null if the ServletContext cannot return a RequestDispatcher