i have read lots of threads that try to clarify the paths associated with a requestdispatcher.
but the damn thing isnt yet clear. i have probelms even while running some sample applications of my own, which usee the requestdispatcher
i have a
servlet that says
RequestDispatcher rd = getServletContext().getRequestDispatcher("/result.jsp");
but when i run my app, i see a blank page, or in other words, contents from the result.jsp arent displyed on the browser
where should i place the result.jsp ?? Please mention propery the exact directory structure
Now if i make the servlet to say -
1) RequestDispatcher rd = request.getRequestDispatcher("/jsp/result.jsp");
where do i keep the "jsp" folder ? should i keep it as
myApp/WEB-INF/jsp/reult.jsp OR
myApp/jsp/result.jsp ??
2) RequestDispatcher rd = request.getRequestDispatcher("result.jsp");
again the same question-- where should i keep the result.jsp ?
3) RequestDispatcher rd = request.getRequestDispatcher("/result.jsp");
where should i place the result.jsp ??
4)RequestDispatcher rd = getServletContext().getRequestDispatcher("/jsp/result.jsp");
where do i keep the "jsp" folder ? should i keep it as
myApp/WEB-INF/jsp/reult.jsp OR
myApp/jsp/result.jsp ??
When you reply to my query.please dont bluff the typical lines from the spec- "relative to the context root" or "relative to current request
i want a dirctory structure for all the POSSIBLE paths that we can use in getRequestDispatcher(
String path)
i would be grateful if you give a explanation lik - "if the path is "...../..../....jsp" then place the
jsp in "..../.../..." where .... is directory name.
the whole thing is f****ing me a lot, and i want to get a solid understaning of it in my mind.
"EVEN IF I AM TAKING CARE OF THE DIRECTORY STRUCTURE AND THE PATHS, WHAT COULB B THE REASON THAT I M NOT
GETTING A BLANK PAGE AS TEH OUTPUT??"
please help out
niranjan