String output question
Why wont this print?
out.print("<LINK REL="STYLESHEET" TYPE="text/css" href="style.css">")
How can I tell Java to ignor the special characters?
Because you have not constructed the string properly
it should be
"<LINK REL="STYLESHEET" TYPE="text/css" href="style.css">"
"<LINK REL='STYLESHEET' TYPE='text/css' href='style.css'>"
Nope, not true
When you want the output HTML code to be XHTML compliant for instance, you need to have it like <link rel="stylesheet" type="text/css" href="style.css">
This can be done like this:
out.println("<link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\">");
when using ["] in a String in Java you need to escape it using a [\]
what is not true about the fact that he did not cunstruct his string properly. I offered an alternative, it works as I use it my self. The issue was he did not construct his string correctly. So there is nothing to say nope, not true about.
By airrazor in forum Java
Last Post: 11-06-2005, 10:18 AM
Last Post: 09-09-2005, 11:17 AM
By Martin in forum VB Classic
Last Post: 12-03-2001, 03:53 AM
By Patrick Comeau in forum VB Classic
Last Post: 03-22-2001, 10:50 PM
By Mike in forum VB Classic
Last Post: 04-24-2000, 03:30 PM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center