Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Servlets
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Servlets
Not displaying images when using RequestDispatcher.forward() for passing control from
kishukishor patil
Greenhorn
Posts: 23
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
Posts: 23
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
Posts: 13411
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
Too many men are afraid of being fools - Henry Ford. Foolish tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Regarding forwarding and including response from other Servlets
forwarding within the application
jsp:forward question...
RequestDispatcher forward doubt?
difference between sendRedirect and forward of Requestdispatcher
More...