Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

email hyperlink

 
Chris Pat
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
I am trying to construct within a servlet an email with a hyperlink made up of the components. What I cant seem to do is escape successfully and have the resulting string include the ""
I want to appear in the message bode <a href="serverNameAndURI">clickMe</a>
I have tried building it with StringBuffer but still cant get the " correct. Can someone help with the proper technique and syntax.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64980
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Java, quote characters within string literals are escaped with the backslash character (\).
 
Rahul Shilpakar
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can write it as :

<blockquote>code:
<pre name="code" class="core"> <a href="\"serverNameAndURI\"">clickMe</a> </pre>
</blockquote>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic