Hi , I am trying to insert an image in the table.Here is the jsp for that where I give an image name..Nothing happens once I run it..The browser is blank..The code works fine when I put it in a java class with a main method..Could someone please tell me what the problem is..I am new to java and struggling with this..
If you are going to post more than a line or two of your code, wrap that code in a set of UBB Code tags. Doing so will help to preserve your code's indenting, making it easier to read. If it is easier to read, more people will actaully read it and you will stand a better chance of getting help with your question. See UseCodeTags for more help with UBB code tags.
In your servlet you can either call getServletOutputStream() or getWriter() method on the response object. You cant call both. Since your jsp is also a servlet, and getWriter() will be automatically called by the container to provide you out implicit valriable. So you cant call getServletOutputStrem() in JSP. And using your out variable you cant send any binary data. So you cant process images in your JSP
We're pleased to have you here with us in the servlets forum, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.
In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.