Coding links for dynamic html in a servlet

Please could you give me the code to get a link to appear in a dynamic html page, created in a servlet as follows:

out.println("<A HREF= TARGET=image> Load Image</a>")

I need to put double quotes around the file name and the target name, but the compiler will not accept this, it thinks they signify the end and start of new strings.

How do I get around this.

Who is Participating?
shchukaConnect With a Mentor Commented:
This is simple:

out.println("<A HREF=\"\" TARGET=\"image\">Load Image</a>");

Basically, you need to prepend the double quote with a backslash (\)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.