now what i am trying to do is replace the last part with a variable so that i can select different books to display at the moment the are a few books on this webspace an example of which is The Arabian Nights) Childrens Classics so changing no-image.gif for 9781858137162.jpg works fine
If however i substitute no-image.gif for a variable lets call it the lastbit and try to construct the url then it does not work can anyone tell me why or tell me how to solve the problem
so just to be clear
data.writeTofile("<h2><font color = blue>is a stock picture</font></h2>"); i use this type of arrangement to generate the html
That is a string literal. It does not use or attempt to use any variable. Just because you have a string with the same couple of characters as the variable name does not mean that those characters will be replaced by the variable. You have to actually use the variable. Maybe something like this will work:
I am sure there are better libraries for writing HTML in Java than you writing your own. This all looks very fragile to me. I think you should investigate some tool to use to handle the HTML writing for you.