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
*/
search.init();
Vector
v1=search.startSearch("\\disscusion_forum","formname");
for(int i=0;i<v1.size();i++){
try{
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");
out.println(e.getMessage());
}
}
%>
I should be able to open files return from the search.
Can anybody help me?
Thanx in advance.
Regards
parag
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
*/
search.init();
Vector
v1=search.startSearch("\\disscusion_forum","formname");
for(int i=0;i<v1.size();i++){
try{
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");
out.println(e.getMessage());
}
}
%>
I should be able to open files return from the search.
Can anybody help me?
Thanx in advance.
Regards
parag