| Author |
problem in pointing to a servlet from image tag.
|
gayathri murugesan
Ranch Hand
Joined: Dec 21, 2009
Posts: 32
|
|
this is the servlet that i am trying to call from another servlet using
out.println("<img src='/worst?id=5'>");
but i am not getting the image . please help me out.
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16487
|
|
|
It's possible that URL doesn't point to your servlet correctly. It's possible that the SQL query doesn't select any rows. It's possible that your database code throws an exception. I'm sure there are other possibilities. So given all of that, it would help if you explained exactly what you see instead of just saying you don't get the image. You might also want to review the server logs and debug your servlet code to see what, if any, lines of code are being executed.
|
 |
Hebert Coelho
Ranch Hand
Joined: Jul 14, 2010
Posts: 754
|
|
As Paul Clapham said, "explained exactly what you see instead of just saying you don't get the image".
Check the url that your method is creating. It is possible that this url is poiting to some invalid link.
[=
|
[uaiHebert.com] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56521
|
|
|
As Paul pointed out, most likely the URL is invalid. Do a View Source of the page and cut/paste the URL of the image tag into the browser address bar. Does the image appear? If not, the URL is not correct.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: problem in pointing to a servlet from image tag.
|
|
|