Hello there,
Might be a silly question,but I suppose you have tried to create
your
Object, and then marshal it to a string via Castor (and output the
result), correct?
And if I understand correctly, steps above in a standalone application
returns exactly what you want (a line feed..)
Then when you run it into tomcat, that line feed disappear.
Question: can you describe how are you using Castor inside tomcat?
Are you using it to pass XML strings to a webservice?
Are you using it to pass XML strings to pages?
Where is the generated document? In your jsp?
Regards
marco
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: 05 November 2004 10:40
To: [EMAIL PROTECTED]
Subject: Re: [castor-user] Marshalling linefeeds
Hi again.
Got no answer so far, but found out that a little application that
isolates the problem works perfectly outside Tomcat. Therefore it seems
like the problem is introduced by something tomcat brings with it. Will
have to investigate further.
Hiran
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 03, 2004 11:21 AM
> To: [EMAIL PROTECTED]
> Subject: [castor-user] Marshalling linefeeds
>
>
> Hi there.
>
> I have some java beans generated from an XML Schema.
> Whenever I set a string property to a value that contains
> linefeeds, the generated XML document contains no linefeeds,
> thus giving me the wrong value after unmarshalling.
>
> Code looks like this:
>
> Service service = new Service();
> service.setDescription("First line\nSecond line");
> StringWriter sw = new StringWriter();
> service.marshal(sw);
> System.out.println(sw.toString());
>
> Is there something I need to reconfigure?
>
> Hiran
>
> -----------------------------------------
> Hiran Chaudhuri
> SAG Systemhaus GmbH
> Elsenheimer Stra�e 11
> 80867 M�nchen
> Phone +49-89-54 74 21 34
> Fax +49-89-54 74 21 99
>
>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user