Title: RE: what's wrong with this piece of code

Actually, I think it's because you're mixing double quotes in your strings and within the <jsp> tag.  try using single quotes or escaping the double quotes.

ie:
 String newDate = "%><jsp:getProperty name=\"lineItem\" property=\"date\" /><%";

However, if you just want the actual date as a string, then do as Brian suggested.

Billy
[EMAIL PROTECTED]
(310) 348-3142

-----Original Message-----
From: Brian Dame [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 27, 2001 12:59 PM
To: [EMAIL PROTECTED]
Subject: Re: what's wrong with this piece of code
Importance: Low


You're mixing an xml tag with a scriplet, which is not allowed.
Try this instead:

<%
 String newDate = new String();
 newDate = lineItem.getDate();
%>

Or better:

<%
 String newDate = lineItem.getDate();
%>



-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Eric Cho
Sent: Tuesday, November 27, 2001 3:46 PM
To: [EMAIL PROTECTED]
Subject: what's wrong with this piece of code


Hi all,

need a hand....I'm getting errors of :

.........java:751: String not terminated at end of line.
                              newDate = "
                                        ^
.........java:757: String not terminated at end of line.
                              ";


for this code



<%
 String newDate = new String();
 newDate = "%><jsp:getProperty name="lineItem" property="date" /><%";

%>


can you point out what i'm doing wrong please?


Thanks,

Eric

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to