Solved

Coding links for dynamic html in a servlet

Posted on 1998-08-03
1
177 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
ID: 1230784
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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ejb wildfly example 2 70
Create animated movies for web page 18 119
Problem to Alipay 10 67
Setup GlassFish 4 34
Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

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