Guys...
I am trying to do this stuff in a JSP page.
It shows me different behaviours on different app servers.It works fine on
TOMCAT but not on WebLogic6.0.
Apparently getRealPath() does not function on WebLogic6.0 and returns
null.Hence i am not getting expected results.
Can anyone help me out on this.Do we have something similar to getRealPath()
on webLogic6.0? Or how can i tweak this existing code so that it works on
WebLogic6.0
thanx in advance
abhi
public String getHelpUrl(String file_name){
String dir_name = "";
String docRoot = "";
String relPath = "..";
String abs_file= "" ;
docRoot = getServletConfig().getServletContext().getRealPath("/");
System.out.println("root ===> " + docRoot);
dir_name = "/xxx/foundation/help/defaultlocale/";
abs_file = docRoot + dir_name + file_name +".html";
System.out.println("Absolute file ===> " + abs_file);
File logDir = new File(abs_file);
System.out.println("dir ===> " + logDir);
System.out.println("is present ===> " + logDir.exists());
if(logDir.exists())
return relPath + dir_name + file_name + ".html";
else
return relPath + dir_name + "book.html";
}
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets