Solved

Coding links for dynamic html in a servlet

Posted on 1998-08-03
1
169 Views
Last Modified: 2013-11-24
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=http://www.javasoft.com/images/duke_404.gif 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.

Thanks
0
Comment
Question by:help_me
1 Comment
 
LVL 2

Accepted Solution

by:
shchuka earned 50 total points
Comment Utility
This is simple:

out.println("<A HREF=\"http://www.javasoft.com/images/duke_404.gif\" TARGET=\"image\">Load Image</a>");

Basically, you need to prepend the double quote with a backslash (\)
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Updating Java 9 85
strDist challenge 35 84
compre toata in where clue oracle 4 39
Java / Linux and Regular Expressions 11 42
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now