How to add image in servlet | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to add image in servlet

it shows error when i write.. out.println("<img src="acd.jpg">");

6th Jan 2017, 2:56 PM
mohan mark
mohan mark - avatar
2 Answers
+ 1
Escape the double quotes like \"
6th Jan 2017, 11:21 PM
nextco
nextco - avatar
0
"<img src=" //here is the end of string acd.jpg // no object called acd ">" // second string to prevent that just use "<img src='acd.jpg'>" singular quotes for file name.
6th Jan 2017, 3:20 PM
Jakub Stasiak
Jakub Stasiak - avatar