tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 
 Tools and Libs > Open Symphony Core > Link URL

Link URL 

OSCore (Open Symphony Core) is a java library with lot of utilities and reusable components. This requires the libraries oscore-2.2.6.jar, mail.jar to be in classpath. The following example shows using TextUtils.linkURL() API.

File Name  :  
com/bethecoder/tutorials/oscore/LinkUrlTest.java 
Author  :  Sudhakar KV
Email  :  kvenkatasudhakar@gmail.com
   
package com.bethecoder.tutorials.oscore;

import com.opensymphony.util.TextUtils;

public class LinkUrlTest {

  /**
   @param args
   */
  public static void main(String[] args) {

    String linkHtml = TextUtils.linkURL("http://bethecoder.com");
    System.out.println(linkHtml);
    
    linkHtml = TextUtils.linkURL("<span>HOME [http://bethecoder.com]</span>");
    System.out.println(linkHtml);
  }

}
   

It gives the following output,
<a href="http://bethecoder.com">http://bethecoder.com</a>
<span>HOME [<a href="http://bethecoder.com">http://bethecoder.com</a>]</span>


                    Print

   



Books Recommendation

 
 
bl  br