SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    Join Date
    Aug 2002
    Location
    N.Ireland
    Posts
    1,046
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    JSP string function help needed

    I'm a complete novice with JSP so need help with querying a string. The following string comes from a search template which checks the url of result
    Code:
    final String resultUrlDisplay = utils.convertToXhtml(results.getResultLocation(resultNo, 80));
    What I need to do is use string functions to test that string and see which website it is from. Based on that, I need to set a class to the anchor and set the image based upon the class. So for example if the result url is microsoft.com the image should be the msn logo, if it's yahoo.com, it's the yahoo logo. Any assistance greatly appreciated!

  2. #2
    SitePoint Evangelist vikrantkorde's Avatar
    Join Date
    Jun 2004
    Location
    Mumbai, India
    Posts
    541
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can you add some more details in the question?
    Vikrant Korde
    S Y S T I M E, Mhape,
    Mumbai, Maharashtra, India.

  3. #3
    SitePoint Member
    Join Date
    Feb 2010
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use IndexOf()


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •