Ulrich Heeger

Ranch Hand
+ Follow
since Jun 06, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Ulrich Heeger

Hi everyone
I have a question: When I invoke the getFileName()-method on a part and the fileName contains ISO 8859-1 character set, then it might be that the file extension is omitted, when the fileName contains whitespaces.
Example:
Filename: Comments f�r test.doc
Result of part.getFileName():


Filename: Commentsf�rtest.doc
Result of part.getFileName():



Is this a bug? Do you know a workaround to get the filename with the file extension?

Thanks a lot in advance
Greetings
Ulrich
16 years ago
Hi everyone,
I have a problem. Previously I had no problem to add a node as parameter to the XSLT-Processor like:

In the Stylesheet I could invoke a element-value within this node like:


now I want use translets:

Now I get following exception when calling the transformation process:


javax.xml.transform.TransformerException: java.lang.RuntimeException: Not valid conversion from 'org.apache.xerces.dom.ElementImpl' to 'node-set'



Do you know what is wrong?
Thanks a lot in advance,
Ulrich

[ January 15, 2007: Message edited by: Ulrich Heeger ]
[ January 15, 2007: Message edited by: Ulrich Heeger ]
Hi Peter, Michael, Ulf,
sorry, that I haven't answered earlier. I haven't been in the office since friday. Thanks a lot for your help,
regards,
Ulrich
17 years ago
Hi everyone,
I have a problem. Within my JPanel I have several textfields and one button.
Because the button is located right of my first textfield, when I use the tab key the focus is jumping from the first textfield to the button. But I want the focus to jump from the first to the second textfield. Because I don't want to change the visual order of my components, do you have any idea?
Regards,
ulrich
17 years ago
Hi Paul,
thank you for your advice. I've found now the problem: I was using an older version of xalan, after updating my xalan.jar to a newer version, I don't have the problem anymore.
Regards,
Ulrich
Hi Paul,
thanks for your help. You're right, this code is just a simulation of a problem I have at work. There I get the byte-Array from a corba connection.
There the code looks like:


But the main problem persists. Why is there a difference of performance between this code and the other, where I don't have any input?
Greetings and thanks in advance,
Ulrich
[ August 23, 2006: Message edited by: Ulrich Heeger ]
Hi everyone,
when I transform xml with a xsl-Stylesheet within a seperat thread, which I will start from a Master thread:


and I'm starting the threads from a master thread, which guarantee that only one thread is running in the background:


it will increase the heap utilization until I get an OutOfMemoryError. If I have no xml input for the transformation like:

the heap utilization remains more or less konstant. Of course, if I repeat the xml-transformation with input-xml within one thread the heap utilization keeps konstant too.
Do you have any idea? Is it not advisable to start new thread for the transformation of xml, or have I missed something to enable the garbage collector to destroy all content of a thread?
I would be very thankful for your help.
Regards,
Ulrich
Hi everyone,
In java 1.4, I used saxon and there I had the possibility to declare a namespace like following:

Since 1.5, XPath is included in the Java API, but I can't find any possibility to declare a namespace like above.
Can you help me? Thanks in advance,
Ulrich
Hi everyone,
From my xsl-Stylesheet I want to invoke a method which returns a List of an Object. My xsl looks like:


and my java code looks like:


But it doesn't work. I get an Exception: java.util.ArrayList
can't be converted in a NodeList.
Do you know a work around?
I would be very thankful for help
Thanks in advance & greetings,
Ulrich

[ February 20, 2006: Message edited by: Ulrich Heeger ]
[ February 20, 2006: Message edited by: Ulrich Heeger ]
Hi Paul,
thank you very much for your help. I suppose you're right because when I compare the two messages, the one created by Java Mail, the other by Outlook, the second message contains a second body part containing the plain text version additionally to the first body part containing the html version. This message can be displayed with the attachments within Lotus Notes. So I will try this and post the result later.
Thanks & regards,
Ulrich
Hi everyone,
I have created Multipart Message to send to different mail users. The problem is now that the recipient using Lotus Notes can't see the attachment, whereas Outlook has no problem. Here is my code snippet:

I would be very thankful if you could help me.
Regards, Ulrich
Hi Stan,
today i have created a new method with following pseudo-code:

That works fine. Thanks a lot. But now I have a new problem , see my new thread. If you have time & patience I would be very thankful if you could help me.

Regards,
ulrich
19 years ago
Hi everyone,
I would to copy one message to another by replacing certain content of the mail.
I have for example one mail with attachments, containing both binary and character datas.
I would like to replace certain words in the body text (html) of the mail matching a pattern, before creating a new Message and copying the content of the old message to the new.
The html content and the parts should be preserved, so that images within the html-text should remain referenced.
First I iterated through the parts to get the body part which contains the html to replace the concerning words and to copy the parts to new ones. But the reference of the image tag to one attachment were not valuable any more.
So I had the idea to get the InputStream of the message:

But now I don't know how to get the InputStream in the new message. When I create a new MimeMessage(session, in) and I will send this message, the recipient will see the whole content as body content without any parts.
Does anybody have an idea?I would be very thankful for help.

Regards, Ulrich
[ August 29, 2005: Message edited by: Ulrich Heeger ]
19 years ago
Hi Stan,
thanks a lot for your help.
Your pseudocode sounds really reasonnable to me and I will try the way you suggested. Also thanks for your advice concerning Boyer Moore search algorithm, I will have a look on it.
I wish you a nice week-end,
Ulrich
19 years ago
Hi everyone,
I have an InputStream containing both binary and ASCII datas.
I would like to scan through an InputStream to find if it contains a certain String. I was thinking about to convert the String to a byte-Array and to scan through the byte-Array gained of the InputStream in order to replace the matching bytes with a new String. I can't transform the InputStream in a String because in this case the binary datas may be corrupted by converting them back in bytes.
Does somebody know a Utility class /methods or an alternative for these purposes?

Thanks a lot in advance & greetings,
Ulrich
19 years ago