ava.io.File.separatorChar in jsp
hallo
In jsp T want rset a javascript variable
out.print("parent.seperatorChar="+"'"+java.io.File.separatorChar+"'"+";");
but I become an error Error: unterminated string literal
what is wrong
hallo
In jsp T want rset a javascript variable
out.print("parent.seperatorChar="+"'"+java.io.File.separatorChar+"'"+";");
but I become an error Error: unterminated string literal
what is wrong
Try the following in your JSP it should work:
<%
out.print("parent.seperatorChar=" + "'" + java.io.File.separatorChar + "'" + ";");
%>
Remember to enclose your java scriptlet code inside <% %>
I didn't get the error Error: unterminated string literal
I got this output on the JSP :
parent.seperatorChar='\';
The "unterminated string literal" error message is a Javascript error message.
Are you using Javascript on that page?
Check your Javascript code for syntax errors.