| Author |
Not displaying images when using RequestDispatcher.forward() for passing control from
|
kishukishor patil
Greenhorn
Joined: Nov 20, 2008
Posts: 23
|
|
Hello all... Here i'm trying to pass control from servlet to jsp using RequestDispatcher.forward(). When i'm trying with sendRedirect it works fine ....but for forward() it doesn't shows images and also not applies the css .. can anyone help me....? Thanks......
|
 |
kishukishor patil
Greenhorn
Joined: Nov 20, 2008
Posts: 23
|
|
code that i implemented is..... RequestDispatcher dispatch = getServletContext().getRequestDispatcher("/Project/login.jsp"); dispatch.forward(xmlreq, res); xmlreq is request object and res is response object... it shows login.jsp but without images..... please suggest if anyone encountered such problem.....
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
Your URLs are most likely not relative to the root of the web application. See: http://faq.javaranch.com/java/RelativeLinks and/or http://faq.javaranch.com/java/ResourceUrlProblems
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
 |
|
|
subject: Not displaying images when using RequestDispatcher.forward() for passing control from
|
|
|