This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes Head First Java 2nd ed Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Head First Java 2nd ed Question" Watch "Head First Java 2nd ed Question" New topic
Author

Head First Java 2nd ed Question

Jim Moffat
Greenhorn

Joined: Sep 18, 2006
Posts: 8
Two questions:

(1) Page 629, the "KathyServlet" example,

I am getting an error on the line

out.println("
make another phrase
");

The error says

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


Question 2:

I am running Orion and the book on pp. 625-626 implies that you can put a servlet on an anchor




But apparaently html won't come up.What should the anchor reference look like using Orion?
Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8801
    
    5
let's slide this over to the Servlets forum


Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

Actually, I'm going to re-slide this over to Java in General (beginner) as it's not a Servlet issue per se.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Head First Java 2nd ed Question
 
Similar Threads
Head First Java 2nd ed Question
sendRedirect method
Connection Pooling
Head First Java 2nd ed Question
Servlets from an HTML anchor