Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   linking to a web page (http://www.go4expert.com/forums/linking-web-page-t17237/)

Juuno 30Apr2009 12:11

linking to a web page
 
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.


All times are GMT +5.5. The time now is 05:00.