C:\Java Stuff>javac PhraseOMaticServlet.java PhraseOMaticServlet.java:19: illegal escape character out.println(" make another phrase</<br /> p>"); ^ PhraseOMaticServlet.java:19: ')' expected out.println(" make another phrase</<br /> p>"); ^ PhraseOMaticServlet.java:19: unclosed string literal out.println(" make another phrase</<br /> p>");
^ 3 errors
I am running Orion and the book on pp. 625-626 implies that you can put a servlet on an anchor
Within the String, if you want to use \ as an actual character, you must precede it with another \, because \ is the escape symbol. The compiler is telling you in this case that it doesn't recognize the escape sequences like \P.
The problem is that one of the quotes is not properly escaped.
Joined: Sep 18, 2006
Ahhh....that's not in the book! Thanks.
Now, as to my other question
This code is in the book
But the broswer won't bring up the HTML document. I am running Orion, so how should I code the link to the servlet class? The Cattle Drive code page showed the URL using "servlet/classname" and that didn't work either. So it is possible to link a servlet like that? The Head First book was not too clear on this.