| Author |
Escape Sequence problem
|
Raja Sagar Panamgipalli
Ranch Hand
Joined: Aug 13, 2003
Posts: 109
|
|
Hi All, i'm having a problem with compilation at this statement....can anyone plz explain how to go about resolving such errors. ShoppingCart.java:41: illegal escape character out.println("<hr><p><a href='\cart\servlet\catalog\'>back to homepage </a></p>"); ^ ShoppingCart.java:41: illegal escape character out.println("<hr><p><a href='\cart\servlet\catalog\'>back to homepage </a></p>"); ^ ShoppingCart.java:41: illegal escape character out.println("<hr><p><a href='\cart\servlet\catalog\'>back to homepage </a></p>"); thank you so much.... Sagar
|
SCJP 1.4<br />SCBCD 1.3
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
URLs use forward slashes not back slashes That should take care of it. BTW: If you ever do need to put a backslash in a string, just escape it with another backslash Example: [ April 24, 2005: Message edited by: Ben Souther ]
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
 |
|
|
subject: Escape Sequence problem
|
|
|