1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

linking to a web page

Discussion in 'Java' started by Juuno, Apr 30, 2009.

  1. Juuno

    Juuno New Member

    Joined:
    Feb 3, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    I have an xml file which includes file name and source(which is web page link) like following:

    <file>
    <name>Japan</name>
    <source>http //en.wikipedia.org/wiki/Japan</source>
    </file>
    <file>
    <name>USA</name>
    <source>http //en.wikipedia.org/wiki/Japan</source>
    </file>

    And my program accept the <name> as user input via web UI. So, when the user input 'Japan', then my program will search through the xml file and then return source, I mean the link of the web page.

    But I get the text of the <source> tag as a string and when I try to return it to my JSP and run my program, there's an error when I click on the link:
    http // localhost:8080/ myfolder/ %22 (The request resource is not available).

    I know that it's because it really doesn't exist in that folder. But what I want is to point to the actual address, like search engine.

    How can I do this?
    Thanks in advance.
     

Share This Page