Ok I am writing a portlet using jsp with embedded java. The Java code accesses a file stored in a folder on a drive which contains HTML files located in the same folder however when i create links to access these HTML files the browser says it cannot find the page. Is it my pathname/url or is it my code both are below:
URL:
String path = "C:/liferay-portal-5.2.3/tomcat-6.0.18/webapps/ROOT/html/";
Code to create links:
Also, it is safe to assume that a none of the variables are null i have check that a dozen different ways just to be sure.
If anyone can help i would appreciate it.
URL:
String path = "C:/liferay-portal-5.2.3/tomcat-6.0.18/webapps/ROOT/html/";
Code to create links:
Code:
out.println("<span class=\"titleinfo\">"+title.get(0)+"</span><br />");
for(int k=0;k<gtitl.size();k++){
if(hasglink.get(k).equals("no")){
out.println("<span class=\"linktitleinfo\"><img"+
" src=\"/announcement-portlet/bullet1.gif\""+
" class=\"imageinfo\"></img>"+gtitl.get(k)+"</span>:"+
"<br /><span class=\"dateinfo\">"+gdate.get(k)+"</span>"+
"<br /><span class=\"textinfo\">"+gtext.get(k)+"</span>"+
"<br /><br />");
}else{
out.println("<span class=\"linktitleinfo\"><img"+
" src=\"/announcement-portlet/bullet1.gif\""+
" class=\"imageinfo\"></img>"+gtitl.get(k)+"</span>:"+
"<br /><span class=\"dateinfo\">"+gdate.get(k)+"</span>"+
"<br /><a href=\""+glink.get(k)+"\""
+" onclick=\"openlink()\" "+
"target=\"newWin\" class=\"linkinfo\"><span "+
"onmouseover=\"this.style.color=\'#ff0000\';\" "+
"onmouseout=\"this.style.color=\'#0000ff\';\">"+
gtext.get(k)+"</span></a><br /><br />");
}
}
out.println("<span class=\"titleinfo\">"+title.get(1)+"</span><br />");
for(int l=0;l<ltitl.size();l++){
if(hasllink.get(l).equals("no")){
out.println("<span class=\"linktitleinfo\"><img"+
" src=\"/announcement-portlet/bullet1.gif\""+
" class=\"imageinfo\"></img>"+ltitl.get(l)+"</span>:"+
"<br /><span class=\"dateinfo\">"+ldate.get(l)+"</span>"+
"<br /><span class=\"textinfo\">"+ltext.get(l)+"</span>"+
"<br /><br />");
}else{
out.println("<span class=\"linktitleinfo\"><img"+
" src=\"/announcement-portlet/bullet1.gif\""+
" class=\"imageinfo\"></img>"+ltitl.get(l)+"</span>:"+
"<br /><span class=\"dateinfo\">"+ldate.get(l)+"</span>"+
"<br /><a href=\""+llink.get(l)+
"\" onclick=\"openlink()\" "+
"target=\"newWin\" class=\"linkinfo\"><span "+
"onmouseover=\"this.style.color=\'#ff0000\';\" "+
"onmouseout=\"this.style.color=\'#0000ff\';\">"+
ltext.get(l)+"</span></a><br /><br />");
}
}
If anyone can help i would appreciate it.
Comment