I have a servlet that calls up an html etc. The nested page will not load and when I check servlet log is states the following:
2001-09-21 01:09:34 - path="" :jsp: init
2001-09-21 01:11:28 - path="" :LoginServlet: init
2001-09-21 01:11:54 - path="" :CourseServlet: init
2001-09-21 01:12:19 - path="" :LessonServlet: init
2001-09-21 01:12:28 - path="" :Error: /usr/local/apache/sites/tesco.spinweb.net/htdocs/cmi/courses\Food Service/Lesson01/AU01/AU01.html (No such file or directory)
The reason it can't find the html is due to "\" being there instead of "/"
I've checked my DB and all my script and it still comes up with the same error of not finding same. Below is a section of script that should replace any "\" with "/". Is there something I'm missing here:
private String getAUHtml (String path){
path = path.replace ('\\', '/');
String response;
response = "<html>\n" +
"<head>\n" +
"</head>\n" +
"<body>\n" +
"<script language=\"JavaScript\">\n" +
"document.location = \"/cmi/courses/" + path + "\"\n" +
//"win = window.open ('','displayWindow','menubar=yes,scrollbars=yes,status=yes,width=300,height=300');\n" +
//"window.onload = \"win.close();\"" +
"</script>\n" +
"</body>\n" +
"</html>\n";
return response;
Thanks in advance for any help anyone could provide me.
2001-09-21 01:09:34 - path="" :jsp: init
2001-09-21 01:11:28 - path="" :LoginServlet: init
2001-09-21 01:11:54 - path="" :CourseServlet: init
2001-09-21 01:12:19 - path="" :LessonServlet: init
2001-09-21 01:12:28 - path="" :Error: /usr/local/apache/sites/tesco.spinweb.net/htdocs/cmi/courses\Food Service/Lesson01/AU01/AU01.html (No such file or directory)
The reason it can't find the html is due to "\" being there instead of "/"
I've checked my DB and all my script and it still comes up with the same error of not finding same. Below is a section of script that should replace any "\" with "/". Is there something I'm missing here:
private String getAUHtml (String path){
path = path.replace ('\\', '/');
String response;
response = "<html>\n" +
"<head>\n" +
"</head>\n" +
"<body>\n" +
"<script language=\"JavaScript\">\n" +
"document.location = \"/cmi/courses/" + path + "\"\n" +
//"win = window.open ('','displayWindow','menubar=yes,scrollbars=yes,status=yes,width=300,height=300');\n" +
//"window.onload = \"win.close();\"" +
"</script>\n" +
"</body>\n" +
"</html>\n";
return response;
Thanks in advance for any help anyone could provide me.