lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Paransky" <>
Subject RE: error regarding opening the search results
Date Thu, 25 Oct 2001 23:32:54 GMT
Can you show the values of item and url?  Are those correctly retrieved?
Also you are missing an extra set of quotes around the item.  The proper
syntax is:

<a href="URL">string</a>

Note the there are quotes around the URL...  You need something like this:
out.println("<a href=\""+item+"\">"+url+"</a>");

There is not enough information to diagnose the problem...

-----Original Message-----
From: Parag Dharmadhikari []
Sent: Thursday, October 25, 2001 3:37 AM
To: lucene-user
Subject: error regarding opening the search results

Hi all,

I have written the code which gives me the url of searched results and that
url I am converting to the anchors. But the the problem is after clicking on
the link, I should be able to go and open the file it is referring, but
instead of that I am getting error as "Page can not be found".

My code is:
                **search is the instance of the bean that I am using and
startSearch returns me a vector filed up with path of hits


                for(int i=0;i<v1.size();i++){
                                String item=((String)v1.elementAt(i));
                                out.println("val: "+item);
                                URL u=new URL("http",null,item);
                                String url=u.toString();
                                out.println("<a href="+item+">"+url+"</a>");
                        }catch (Exception e){
                                out.println("Error in forming URL");

I should be able to open files return from the search.

Can anybody help me?
Thanx in advance.


View raw message